0f6860f1ae
- new src/hooks/ui/useIsMobile.ts (matchMedia + useSyncExternalStore) replacing the resize-handler hook inlined inside pages/site/page.tsx - new src/hooks/ui/usePrefersReducedMotion.ts - new src/data/site/dialogueIds.ts so site and intro components stop carrying hard-coded narrator IDs - siteConfig: add SITE_BACKGROUND_STYLE shared by SiteLayout and SiteMobileBlocker, rename forcedName to presetPlayerName, fix the swapped id/label pairing on situation cards - useSiteStore: rename selectedExperience/Situation to *Index so the stored value (an array index) is obvious in callers - audioConfig: drop dead AUDIO_PATHS placeholders - propagate the renames and SITE_BACKGROUND_STYLE through SiteLayout, SiteWelcomeScreen, SiteSituationScreen and pages/site/page.tsx
30 lines
710 B
TypeScript
30 lines
710 B
TypeScript
import type { ReactNode } from "react";
|
|
import { SITE_BACKGROUND_STYLE } from "@/data/site/siteConfig";
|
|
import { Subtitles } from "@/components/ui/Subtitles";
|
|
|
|
interface SiteLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export function SiteLayout({ children }: SiteLayoutProps): React.JSX.Element {
|
|
return (
|
|
<div
|
|
style={{
|
|
position: "fixed",
|
|
inset: 0,
|
|
display: "flex",
|
|
flexDirection: "column",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
...SITE_BACKGROUND_STYLE,
|
|
fontFamily: "system-ui, -apple-system, sans-serif",
|
|
color: "#fff",
|
|
overflow: "hidden",
|
|
}}
|
|
>
|
|
{children}
|
|
<Subtitles />
|
|
</div>
|
|
);
|
|
}
|