TypeScript 97.6%
SQL 1.4%
JavaScript 0.5%
1import type { Metadata } from "next";2import type { GameCard, PublicUser, UserSettings, WalletView } from "@spinza/shared";3import { apiServer } from "@/lib/api-server";4import { AppShell } from "@/components/shell/app-shell";5import { Landing } from "@/components/lobby/landing";6import { Lobby } from "@/components/lobby/lobby";78export const metadata: Metadata = {9 title: "Spinza — The Virtual Casino Playground",10 description: "Twenty original casino-style games played with free fictional credits. No deposits. No withdrawals. No cash value. 18+.",11 alternates: { canonical: "/" },12};1314interface GamesResponse {15 games: GameCard[];16 livePlayers: number;17 recommendations: string[];18}1920export default async function HomePage() {21 const [session, lobby] = await Promise.all([apiServer<{ user: PublicUser; wallet: WalletView; settings: UserSettings }>("/api/user"), apiServer<GamesResponse>("/api/games")]);2223 if (!session) {24 return (25 <>26 <AppShell wide>27 <Landing games={lobby?.games ?? []} apiDown={lobby === null} />28 </AppShell>29 <script30 type="application/ld+json"31 dangerouslySetInnerHTML={{32 __html: JSON.stringify({33 "@context": "https://schema.org",34 "@type": "WebSite",35 name: "Spinza",36 url: process.env.NEXT_PUBLIC_SITE_URL ?? "https://www.spinza.dev",37 description: "Original casino-style games played with fictional credits. No deposits, no withdrawals, no cash value.",38 }),39 }}40 />41 </>42 );43 }4445 return (46 <AppShell>47 <Lobby user={session.user} games={lobby?.games ?? null} livePlayers={lobby?.livePlayers ?? 0} recommendations={lobby?.recommendations ?? []} />48 </AppShell>49 );50}51