mirror of
https://github.com/jakejarvis/sofa.git
synced 2026-08-29 06:15:39 -04:00
- Delete carousel.tsx and replace all Carousel/CarouselContent/CarouselItem usage across title rows, cast carousel, continue watching, and explore sections with ScrollArea + scrollFade horizontal scroll - Update ScrollArea to accept a `scrollFade` prop that renders a gradient edge overlay instead of the old per-site absolute div hack - Remove "use client" directive from title-row and cast-carousel now that they have no client-side hooks - Delete unused resizable.tsx; inline TypeBadge icon into TitleHero and delete the standalone type-badge.tsx file - Add TitleTheme component for per-title accent color CSS injection - Swap IconSparkles → IconThumbUp in recommendations section and grid - Simplify ambient glow to a single size (remove mobile breakpoint override)
47 lines
1.7 KiB
TypeScript
47 lines
1.7 KiB
TypeScript
import { redirect } from "next/navigation";
|
|
import { Suspense } from "react";
|
|
import { CommandPalette } from "@/components/command-palette";
|
|
import { MobileTabBar } from "@/components/mobile-tab-bar";
|
|
import { NavBar } from "@/components/nav-bar";
|
|
import { ProgressProvider } from "@/components/navigation-progress";
|
|
import { UpdateToast } from "@/components/update-toast";
|
|
import { getSession } from "@/lib/auth/session";
|
|
|
|
export default function PagesLayout({
|
|
children,
|
|
}: {
|
|
children: React.ReactNode;
|
|
}) {
|
|
return (
|
|
<Suspense>
|
|
<ProgressProvider>
|
|
<AuthenticatedShell>{children}</AuthenticatedShell>
|
|
</ProgressProvider>
|
|
</Suspense>
|
|
);
|
|
}
|
|
|
|
async function AuthenticatedShell({ children }: { children: React.ReactNode }) {
|
|
const session = await getSession();
|
|
if (!session) redirect("/login");
|
|
|
|
return (
|
|
<>
|
|
<div className="relative z-0 min-h-screen pb-[calc(3.5rem+env(safe-area-inset-bottom))] sm:pb-0">
|
|
<NavBar userName={session.user.name} />
|
|
{/* Ambient glow — smaller on mobile to add warmth without overwhelming */}
|
|
<div className="pointer-events-none fixed top-1/4 left-1/2 h-[600px] w-[800px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/3 blur-[200px]" />
|
|
<main
|
|
id="main-content"
|
|
className="relative mx-auto max-w-6xl py-6 pr-[max(1rem,env(safe-area-inset-right))] pl-[max(1rem,env(safe-area-inset-left))] sm:pr-[max(1.5rem,env(safe-area-inset-right))] sm:pl-[max(1.5rem,env(safe-area-inset-left))]"
|
|
>
|
|
{children}
|
|
</main>
|
|
</div>
|
|
<MobileTabBar />
|
|
<CommandPalette />
|
|
{session.user.role === "admin" && <UpdateToast />}
|
|
</>
|
|
);
|
|
}
|