import Link from "next/link"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { BrandMark } from "@/components/layout/BrandMark"; import { listRecordings } from "@/lib/db/queries/recordings"; import { listPlaySessions } from "@/lib/db/queries/play-sessions"; import { getSessionsSummary } from "@/lib/db/queries/stats"; // Always reflects live DB state for an authenticated, single-tenant app - // never worth prerendering (and the DB file doesn't exist at build time). export const dynamic = "force-dynamic"; export default async function DashboardPage() { const [recordings, sessions, summary] = await Promise.all([ listRecordings(), listPlaySessions(), getSessionsSummary(), ]); const recentRecordings = recordings.slice(0, 5); const recentSessions = [...sessions].reverse().slice(0, 5); return (
Scan for nearby devices, take control, and record sessions to replay later - all running directly from your browser over Web Bluetooth.
Nothing saved yet.
)} {recentRecordings.map((r, i) => ( {i > 0 && }No sessions yet.
} {recentSessions.map((s, i) => ( {i > 0 && }