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
65 changes: 42 additions & 23 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import LightRays from "../components/LightRays";
import Navbar from "../components/Navbar";
import { PostHogProvider } from "./providers";
import { Toaster } from "sonner";
import { Suspense } from "react";

const SchibstedGrotesk = Schibsted_Grotesk({
variable: "--font-schibsted-grotesk",
Expand Down Expand Up @@ -32,29 +33,47 @@ export default function RootLayout({
className={`${SchibstedGrotesk.variable} ${MartianMono.variable} antialiased`}
>
<Toaster richColors position="top-right" />
<PostHogProvider>
<Navbar />
<div className="absolute inset-0 top-0 z-[-1] min-h-screen">
<LightRays
raysOrigin="top-center-offset"
raysColor="#5dfeca"
raysSpeed={0.5}
lightSpread={0.9}
rayLength={1.4}
followMouse={true}
mouseInfluence={0.02}
noiseAmount={0}
distortion={0}
className="custom-rays"
pulsating={false}
fadeDistance={1}
saturation={1}
/>
</div>
<main>
{children}
</main>
</PostHogProvider>
<Suspense fallback={null}>
<PostHogProvider>
<Suspense fallback={
<header className="glass sticky top-0 z-50">
<nav className="flex flex-row justify-between mx-auto container sm:px-10 px-5 py-4">
<div className="logo flex flex-row items-center gap-2">
<img src="/icons/logo.png" alt="logo" width={24} height={24} />
<p className="text-xl font-bold italic max-sm:hidden">DevEvent</p>
</div>
<ul className="flex items-center gap-8 list-none text-white">
<li>Home</li>
<li>Events</li>
<li>Create Event</li>
</ul>
</nav>
</header>
}>
<Navbar />
</Suspense>
<div className="absolute inset-0 top-0 z-[-1] min-h-screen">
<LightRays
raysOrigin="top-center-offset"
raysColor="#5dfeca"
raysSpeed={0.5}
lightSpread={0.9}
rayLength={1.4}
followMouse={true}
mouseInfluence={0.02}
noiseAmount={0}
distortion={0}
className="custom-rays"
pulsating={false}
fadeDistance={1}
saturation={1}
/>
</div>
<main>
{children}
</main>
</PostHogProvider>
</Suspense>
</body>
</html>
);
Expand Down
10 changes: 10 additions & 0 deletions components/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ const navLinkClass = (href: string) =>
Create Event
</Link>
</li>

<li>
<Link
href="/my-bookings"
aria-current={pathname === "/my-bookings" ? "page" : undefined}
className={navLinkClass("/my-bookings")}
>
My Bookings
</Link>
</li>
</ul>
</nav>
</header>
Expand Down