Skip to content

Commit d7af247

Browse files
committed
Update layout.tsx
1 parent 72d9c73 commit d7af247

File tree

1 file changed

+102
-109
lines changed

1 file changed

+102
-109
lines changed

frontend/app/layout.tsx

Lines changed: 102 additions & 109 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ import { GeistSans } from "geist/font/sans";
22
import { ThemeProvider } from "next-themes";
33
import Link from "next/link";
44
import {
5-
Inter,
6-
Baloo_2,
7-
Comic_Neue,
8-
Quicksand,
9-
Chewy,
10-
Fredoka,
11-
Lora,
12-
Inter_Tight,
5+
Inter,
6+
Baloo_2,
7+
Comic_Neue,
8+
Quicksand,
9+
Chewy,
10+
Fredoka,
11+
Lora,
12+
Inter_Tight,
1313
} from "next/font/google";
1414
import "./globals.css";
1515
import { createClient } from "@/utils/supabase/server";
@@ -24,143 +24,136 @@ import PreorderModal from "./components/Upsell/PreorderModal";
2424
import { Button } from "@/components/ui/button";
2525

2626
const inter = Inter({
27-
subsets: ["latin"],
28-
display: "swap",
29-
variable: "--font-inter",
27+
subsets: ["latin"],
28+
display: "swap",
29+
variable: "--font-inter",
3030
});
3131

3232
const inter_tight = Inter_Tight({
33-
weight: ["500", "600", "700"],
34-
style: ["normal", "italic"],
35-
subsets: ["latin"],
36-
variable: "--font-inter-tight",
37-
display: "swap",
33+
weight: ["500", "600", "700"],
34+
style: ["normal", "italic"],
35+
subsets: ["latin"],
36+
variable: "--font-inter-tight",
37+
display: "swap",
3838
});
3939

4040
const baloo2 = Baloo_2({
41-
subsets: ["latin"],
42-
display: "swap",
43-
variable: "--font-baloo2",
41+
subsets: ["latin"],
42+
display: "swap",
43+
variable: "--font-baloo2",
4444
});
4545

4646
const comicNeue = Comic_Neue({
47-
subsets: ["latin"],
48-
display: "swap",
49-
variable: "--font-comic-neue",
50-
weight: ["300", "400", "700"],
47+
subsets: ["latin"],
48+
display: "swap",
49+
variable: "--font-comic-neue",
50+
weight: ["300", "400", "700"],
5151
});
5252

5353
const quicksand = Quicksand({
54-
subsets: ["latin"],
55-
display: "swap",
56-
variable: "--font-quicksand",
54+
subsets: ["latin"],
55+
display: "swap",
56+
variable: "--font-quicksand",
5757
});
5858

5959
const fredoka = Fredoka({
60-
subsets: ["latin"],
61-
display: "swap",
62-
variable: "--font-fredoka",
60+
subsets: ["latin"],
61+
display: "swap",
62+
variable: "--font-fredoka",
6363
});
6464

6565
const lora = Lora({
66-
subsets: ["latin"],
67-
display: "swap",
68-
variable: "--font-lora",
66+
subsets: ["latin"],
67+
display: "swap",
68+
variable: "--font-lora",
6969
});
7070

7171
const fonts = `${inter.variable} ${inter_tight.variable} ${baloo2.variable} ${comicNeue.variable} ${quicksand.variable} ${fredoka.variable} ${lora.variable}`;
7272

7373
const defaultUrl = process.env.VERCEL_URL
74-
? `https://${process.env.VERCEL_URL}`
75-
: "http://localhost:3000";
74+
? `https://${process.env.VERCEL_URL}`
75+
: "http://localhost:3000";
7676

7777
export const metadata = {
78-
metadataBase: new URL(defaultUrl),
79-
title: "Starmoon",
80-
description: "Starmoon, your affordable conversational AI companion",
78+
metadataBase: new URL(defaultUrl),
79+
title: "Starmoon",
80+
description: "Starmoon, your affordable conversational AI companion",
8181
};
8282

8383
export default async function RootLayout({
84-
children,
84+
children,
8585
}: {
86-
children: React.ReactNode;
86+
children: React.ReactNode;
8787
}) {
88-
const supabase = createClient();
88+
const supabase = createClient();
8989

90-
const {
91-
data: { user },
92-
} = await supabase.auth.getUser();
90+
const {
91+
data: { user },
92+
} = await supabase.auth.getUser();
9393

94-
return (
95-
<html
96-
lang="en"
97-
className={`${GeistSans.className} h-full ${fonts}`}
98-
suppressHydrationWarning
99-
>
100-
<body className="bg-background text-foreground flex flex-col min-h-screen bg-gray-50">
101-
<ThemeProvider
94+
return (
95+
<html
96+
lang="en"
97+
className={`${GeistSans.className} h-full ${fonts}`}
98+
suppressHydrationWarning
99+
>
100+
<body className="bg-background text-foreground flex flex-col min-h-screen bg-gray-50">
101+
{/* <ThemeProvider
102102
attribute="class"
103103
defaultTheme="system"
104104
enableSystem
105105
disableTransitionOnChange
106-
>
107-
<main className="flex-grow mx-auto w-full flex flex-col">
108-
<div className="backdrop-blur-[3px] h-[4rem]- h-[60px] flex-none flex items-center sticky top-0 z-50">
109-
<nav className="mx-auto w-full max-w-[1440px] px-4 flex items-center justify-between">
110-
<a className="flex flex-row gap-3" href="/">
111-
<StarmoonLogo
112-
width={33}
113-
height={33}
114-
></StarmoonLogo>
115-
<p className="flex items-center font-chewy font-medium text-xl text-stone-800 dark:text-stone-100">
116-
Starmoon AI
117-
</p>
118-
{/* <p className="text-xs text-gray-500">beta</p> */}
119-
</a>
106+
> */}
107+
<main className="flex-grow mx-auto w-full flex flex-col">
108+
<div className="backdrop-blur-[3px] h-[4rem]- h-[60px] flex-none flex items-center sticky top-0 z-50">
109+
<nav className="mx-auto w-full max-w-[1440px] px-4 flex items-center justify-between">
110+
<a className="flex flex-row gap-3" href="/">
111+
<StarmoonLogo width={33} height={33}></StarmoonLogo>
112+
<p className="flex items-center font-chewy font-medium text-xl text-stone-800 dark:text-stone-100">
113+
Starmoon AI
114+
</p>
115+
{/* <p className="text-xs text-gray-500">beta</p> */}
116+
</a>
120117

121-
<div className="flex flex-row gap-2 items-center font-bold text-sm ">
122-
<Link
123-
href="https://github.com/StarmoonAI/Starmoon"
124-
target="_blank"
125-
rel="noopener noreferrer"
126-
title="Visit our GitHub"
127-
// className="bg-nav-bar rounded-full px-3"
128-
>
129-
<Button
130-
size="sm"
131-
variant="secondary"
132-
className="flex flex-row gap-2 items-center rounded-full bg-nav-bar"
133-
>
134-
<FaGithub className="text-xl" />
135-
<p className="hidden sm:flex font-medium">
136-
GitHub
137-
</p>
138-
</Button>
139-
</Link>
140-
<NavbarButtons user={user} />
141-
<Link href={"/products"} passHref>
142-
<Button
143-
size="sm"
144-
variant="primary"
145-
className="flex flex-row gap-2 items-center rounded-full"
146-
>
147-
<ShoppingCart size={18} />
148-
<p className="hidden sm:flex font-medium">
149-
Preorder
150-
</p>
151-
</Button>
152-
</Link>
153-
</div>
154-
</nav>
155-
</div>
156-
{children}
157-
<Footer />
158-
</main>
118+
<div className="flex flex-row gap-2 items-center font-bold text-sm ">
119+
<Link
120+
href="https://github.com/StarmoonAI/Starmoon"
121+
target="_blank"
122+
rel="noopener noreferrer"
123+
title="Visit our GitHub"
124+
// className="bg-nav-bar rounded-full px-3"
125+
>
126+
<Button
127+
size="sm"
128+
variant="secondary"
129+
className="flex flex-row gap-2 items-center rounded-full bg-nav-bar"
130+
>
131+
<FaGithub className="text-xl" />
132+
<p className="hidden sm:flex font-medium">GitHub</p>
133+
</Button>
134+
</Link>
135+
<NavbarButtons user={user} />
136+
<Link href={"/products"} passHref>
137+
<Button
138+
size="sm"
139+
variant="primary"
140+
className="flex flex-row gap-2 items-center rounded-full"
141+
>
142+
<ShoppingCart size={18} />
143+
<p className="hidden sm:flex font-medium">Preorder</p>
144+
</Button>
145+
</Link>
146+
</div>
147+
</nav>
148+
</div>
149+
{children}
150+
<Footer />
151+
</main>
159152

160-
<Analytics />
161-
<Toaster />
162-
</ThemeProvider>
163-
</body>
164-
</html>
165-
);
153+
<Analytics />
154+
<Toaster />
155+
{/* </ThemeProvider> */}
156+
</body>
157+
</html>
158+
);
166159
}

0 commit comments

Comments
 (0)