diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx index c479089..9f2c1a1 100644 --- a/app/(auth)/layout.tsx +++ b/app/(auth)/layout.tsx @@ -1,16 +1,28 @@ +import { siteConfig } from "@/config/site"; +import { Metadata } from "next"; import { Logo } from "./_components/logo"; -const AuthLayout = ({ - children -}: { - children: React.ReactNode; -}) => { - return ( +export const metadata: Metadata = { + title: { + default: siteConfig.name, + template: `%s | ${siteConfig.name}`, + }, + description: siteConfig.description, + icons: [ + { + url: "/spooky.svg", + href: "/spooky.svg", + }, + ], +}; + +const AuthLayout = ({ children }: { children: React.ReactNode }) => { + return (
{children}
); }; - + export default AuthLayout; diff --git a/app/(browse)/layout.tsx b/app/(browse)/layout.tsx index 0035a7f..8a70543 100644 --- a/app/(browse)/layout.tsx +++ b/app/(browse)/layout.tsx @@ -3,25 +3,35 @@ import { Suspense } from "react"; import { Navbar } from "./_components/navbar"; import { Container } from "./_components/container"; import { Sidebar, SidebarSkeleton } from "./_components/sidebar"; +import { siteConfig } from "@/config/site"; +import { Metadata } from "next"; -const BrowseLayout = ({ - children, -}: { - children: React.ReactNode; -}) => { - return ( +export const metadata: Metadata = { + title: { + default: siteConfig.name, + template: `%s | ${siteConfig.name}`, + }, + description: siteConfig.description, + icons: [ + { + url: "/spooky.svg", + href: "/spooky.svg", + }, + ], +}; + +const BrowseLayout = ({ children }: { children: React.ReactNode }) => { + return ( <>
}> - - {children} - + {children}
); }; - -export default BrowseLayout; \ No newline at end of file + +export default BrowseLayout; diff --git a/app/(dashboard)/u/[username]/layout.tsx b/app/(dashboard)/u/[username]/layout.tsx index dc20496..93f36d7 100644 --- a/app/(dashboard)/u/[username]/layout.tsx +++ b/app/(dashboard)/u/[username]/layout.tsx @@ -5,33 +5,44 @@ import { getSelfByUsername } from "@/lib/auth-service"; import { Navbar } from "./_components/navbar"; import { Sidebar } from "./_components/sidebar"; import { Container } from "./_components/container"; +import { siteConfig } from "@/config/site"; +import { Metadata } from "next"; interface CreatorLayoutProps { params: { username: string }; children: React.ReactNode; +} + +export const metadata: Metadata = { + title: { + default: siteConfig.name, + template: `%s | ${siteConfig.name}`, + }, + description: siteConfig.description, + icons: [ + { + url: "/spooky.svg", + href: "/spooky.svg", + }, + ], }; -const CreatorLayout = async ({ - params, - children, -}: CreatorLayoutProps) => { +const CreatorLayout = async ({ params, children }: CreatorLayoutProps) => { const self = await getSelfByUsername(params.username); if (!self) { redirect("/"); } - return ( + return ( <>
- - {children} - + {children}
); -} - -export default CreatorLayout; \ No newline at end of file +}; + +export default CreatorLayout; diff --git a/app/error.tsx b/app/error.tsx deleted file mode 100644 index 4427b1c..0000000 --- a/app/error.tsx +++ /dev/null @@ -1,22 +0,0 @@ -"use client"; - -import Link from "next/link"; - -import { Button } from "@/components/ui/button"; - -const ErrorPage = () => { - return ( -
-

- Something went wrong -

- -
- ); -}; - -export default ErrorPage; \ No newline at end of file diff --git a/app/favicon.ico b/app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/app/favicon.ico and /dev/null differ diff --git a/app/layout.tsx b/app/layout.tsx index 5c21aff..cf30f53 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,23 +1,33 @@ -import { ClerkProvider } from '@clerk/nextjs' -import { dark } from '@clerk/themes' -import type { Metadata } from 'next' -import { Inter } from 'next/font/google' -import { Toaster } from 'sonner'; -import './globals.css' +import { ClerkProvider } from "@clerk/nextjs"; +import { dark } from "@clerk/themes"; +import type { Metadata } from "next"; +import { Inter } from "next/font/google"; +import { Toaster } from "sonner"; +import "./globals.css"; -import { ThemeProvider } from '@/components/theme-provider' +import { ThemeProvider } from "@/components/theme-provider"; +import { siteConfig } from "@/config/site"; -const inter = Inter({ subsets: ['latin'] }) +const inter = Inter({ subsets: ["latin"] }); export const metadata: Metadata = { - title: 'Create Next App', - description: 'Generated by create next app', -} + title: { + default: siteConfig.name, + template: `%s | ${siteConfig.name}`, + }, + description: siteConfig.description, + icons: [ + { + url: "/spooky.svg", + href: "/spooky.svg", + }, + ], +}; export default function RootLayout({ children, }: { - children: React.ReactNode + children: React.ReactNode; }) { return ( @@ -34,5 +44,5 @@ export default function RootLayout({ - ) + ); } diff --git a/config/site.ts b/config/site.ts new file mode 100644 index 0000000..8adc0a7 --- /dev/null +++ b/config/site.ts @@ -0,0 +1,4 @@ +export const siteConfig = { + name: "Gamehub", + description: "A place to find your favorite gamers and streamers", +};