diff --git a/src/app/(authroutes)/layout.tsx b/src/app/(authroutes)/layout.tsx index 0be009b..a84aaa6 100644 --- a/src/app/(authroutes)/layout.tsx +++ b/src/app/(authroutes)/layout.tsx @@ -1,51 +1,31 @@ import "../globals.css"; -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import { ToggleProvider } from "@/contextProviders/ToggleProvider"; -import NextAuthProvider from "@/contextProviders/sessionProvider"; -import { Toaster } from "react-hot-toast"; +import Sidebar from "@/components/Sidebar"; +import MainContent from "@/components/MainContent"; import { Providers } from "@/store/provider"; import { Suspense } from "react"; -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "TPC Portal", - description: "Generated by create next app", -}; - interface Props { children: React.ReactNode; } -const AuthLayout = async ({ children }: Props) => { - const className = inter.className; - +const RouteLayout = async ({ children }: Props) => { return ( - - - -
- - - -
- {/* sidebar and main content share this space */} - Loading...}> - -
-
- {children} -
-
-
+
+ +
+ {/* sidebar and main content share this space */} + Loading...}> + +
+
+ {children}
- -
- - - +
+
+
+ +
); }; -export default AuthLayout; +export default RouteLayout; diff --git a/src/app/(routes)/layout.tsx b/src/app/(routes)/layout.tsx index 46f477f..11fe162 100644 --- a/src/app/(routes)/layout.tsx +++ b/src/app/(routes)/layout.tsx @@ -1,53 +1,24 @@ import "../globals.css"; -import type { Metadata } from "next"; -import { Inter } from "next/font/google"; -import { ToggleProvider } from "@/contextProviders/ToggleProvider"; import Sidebar from "@/components/Sidebar"; import MainContent from "@/components/MainContent"; -import NextAuthProvider from "@/contextProviders/sessionProvider"; -import { Toaster } from "react-hot-toast"; import { Providers } from "@/store/provider"; import { Suspense } from "react"; -const inter = Inter({ subsets: ["latin"] }); - -export const metadata: Metadata = { - title: "TPC Portal", - description: "Generated by create next app", -}; - interface Props { children: React.ReactNode; - auth: React.ReactNode; } -const RouteLayout = async ({ children, auth }: Props) => { - const className = inter.className; - +const RouteLayout = async ({ children }: Props) => { return ( - - - -
- {/* Page Content */} - - - -
- {/* sidebar and main content share this space */} - Loading...}> - - - - {children} - -
- {auth} -
-
-
- - +
+ {/* sidebar and main content share this space */} + Loading...}> + + + + {children} + +
); }; diff --git a/src/app/layout.tsx b/src/app/layout.tsx new file mode 100644 index 0000000..4893912 --- /dev/null +++ b/src/app/layout.tsx @@ -0,0 +1,46 @@ +import "./globals.css"; +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import { ToggleProvider } from "@/contextProviders/ToggleProvider"; +import Sidebar from "@/components/Sidebar"; +import MainContent from "@/components/MainContent"; +import NextAuthProvider from "@/contextProviders/sessionProvider"; +import { Toaster } from "react-hot-toast"; +import { Providers } from "@/store/provider"; +import { Suspense } from "react"; + +const inter = Inter({ subsets: ["latin"] }); + +export const metadata: Metadata = { + title: "TPC Portal", + description: "Generated by create next app", +}; + +interface Props { + children: React.ReactNode; + auth: React.ReactNode; +} + +const RouteLayout = async ({ children, auth }: Props) => { + const className = inter.className; + + return ( + + + +
+ {/* Page Content */} + + + + {children} + {auth} + +
+
+ + + ); +}; + +export default RouteLayout;