Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 19 additions & 7 deletions app/(auth)/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<div className="h-full flex flex-col items-center justify-center space-y-6">
<Logo />
{children}
</div>
);
};

export default AuthLayout;
32 changes: 21 additions & 11 deletions app/(browse)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Navbar />
<div className="flex h-full pt-20">
<Suspense fallback={<SidebarSkeleton />}>
<Sidebar />
</Suspense>
<Container>
{children}
</Container>
<Container>{children}</Container>
</div>
</>
);
};
export default BrowseLayout;

export default BrowseLayout;
33 changes: 22 additions & 11 deletions app/(dashboard)/u/[username]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<>
<Navbar />
<div className="flex h-full pt-20">
<Sidebar />
<Container>
{children}
</Container>
<Container>{children}</Container>
</div>
</>
);
}
export default CreatorLayout;
};

export default CreatorLayout;
22 changes: 0 additions & 22 deletions app/error.tsx

This file was deleted.

Binary file removed app/favicon.ico
Binary file not shown.
36 changes: 23 additions & 13 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<ClerkProvider appearance={{ baseTheme: dark }}>
Expand All @@ -34,5 +44,5 @@ export default function RootLayout({
</body>
</html>
</ClerkProvider>
)
);
}
4 changes: 4 additions & 0 deletions config/site.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const siteConfig = {
name: "Gamehub",
description: "A place to find your favorite gamers and streamers",
};