Skip to content

Commit

Permalink
Merge pull request #97 from ArhanAnsari/ArhanAnsari-patch-1
Browse files Browse the repository at this point in the history
Added Metadata
  • Loading branch information
ArhanAnsari authored Oct 10, 2024
2 parents 77d201d + d51d985 commit 45d96c8
Show file tree
Hide file tree
Showing 6 changed files with 255 additions and 0 deletions.
41 changes: 41 additions & 0 deletions app/auth/error/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// app/auth/signin/layout.tsx
import React from "react";
import Layout from "@/components/Layout"; // Import Layout
import SEO from "@/components/SEO"; // SEO component
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";

// Metadata for SEO
export const metadata = {
title: "Error - InspireGem",
description: "An error occurred during the authentication process. Please try signing in again.",
};

const ErrorLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
<main className="min-h-screen flex flex-col items-center justify-center">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default ErrorLayout;
41 changes: 41 additions & 0 deletions app/auth/signin/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// app/auth/signin/layout.tsx
import React from "react";
import Layout from "@/components/Layout"; // Import Layout
import SEO from "@/components/SEO"; // SEO component
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";

// Metadata for SEO
export const metadata = {
title: "Sign In - InspireGem",
description: "Sign in to your InspireGem account to start generating amazing content.",
};

const SigninLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
<main className="min-h-screen flex flex-col items-center justify-center">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default SigninLayout;
41 changes: 41 additions & 0 deletions app/auth/signup/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// app/auth/signup/layout.tsx
import React from "react";
import Layout from "@/components/Layout"; // Import Layout
import SEO from "@/components/SEO"; // SEO component
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";

// Metadata for SEO
export const metadata = {
title: "Sign Up - InspireGem",
description: "Sign up to your InspireGem account to start generating amazing content.",
};

const SignupLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
<main className="min-h-screen flex flex-col items-center justify-center">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default SignupLayout;
45 changes: 45 additions & 0 deletions app/dashboard/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// app/dashboard/layout.tsx
import React from "react";
import Header from "@/components/Header";
import Layout from "@/components/Layout"; // Import your Layout
import SEO from "@/components/SEO";
import { ToastContainer } from "react-toastify"; // Import ToastContainer for notifications
import "react-toastify/dist/ReactToastify.css";

// Define Metadata
export const metadata = {
title: "Dashboard - InspireGem",
description: "Manage your AI-powered content generation and explore additional features with InspireGem.",
};

const DashboardLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
{/* SEO Component */}
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
{/* Render the Header and Main Content */}
<Header />
<main className="min-h-screen flex-1 overflow-y-auto p-8">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default DashboardLayout;
45 changes: 45 additions & 0 deletions app/dashboard/upgrade/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// app/dashboard/upgrade/layout.tsx
import React from "react";
import Header from "@/components/Header";
import Layout from "@/components/Layout"; // Import your Layout
import SEO from "@/components/SEO";
import { ToastContainer } from "react-toastify"; // Import ToastContainer for notifications
import "react-toastify/dist/ReactToastify.css";

// Define Metadata
export const metadata = {
title: "Upgrade - InspireGem",
description: "Explore our plans and choose the one that fits your needs best.",
};

const DashboardUpgradeLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
{/* SEO Component */}
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
{/* Render the Header and Main Content */}
<Header />
<main className="min-h-screen flex-1 overflow-y-auto p-8">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default DashboardUpgradeLayout;
42 changes: 42 additions & 0 deletions app/plans/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// app/plans/layout.tsx
import React from "react";
import Layout from "@/components/Layout"; // Import Layout
import SEO from "@/components/SEO"; // SEO component
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.css";

// Metadata for SEO
export const metadata = {
title: "Plans - InspireGem",
description: "Explore our plans and choose the one that fits your needs best.",
};

const PlansLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => {
return (
<html lang="en">
{/* SEO Component */}
<SEO title={metadata.title} description={metadata.description} />
<body className="bg-gray-100 text-gray-900 antialiased">
<Layout>
<main className="min-h-screen p-6 flex flex-col items-center">
{children}
</main>
{/* Toast Notifications */}
<ToastContainer
position="top-right"
autoClose={3000}
hideProgressBar
newestOnTop
closeOnClick
rtl={false}
pauseOnFocusLoss
draggable
pauseOnHover
/>
</Layout>
</body>
</html>
);
};

export default PlansLayout;

0 comments on commit 45d96c8

Please sign in to comment.