- Remove tw-animate-css import + dead src/components/ui shadcn tree - Convert 7 orphaned components (moderation, analysis, guild-selector, voice/activity-timeline, shared/empty+error) to new primitives - Add missing moderation/view.tsx; analysis uses SearchPanel directly - globals.css now uses new signal-driven ops-console tokens - tsc --noEmit clean, next build green (11 routes), local smoke 200
28 lines
790 B
TypeScript
28 lines
790 B
TypeScript
/**
|
|
* Dashboard — Server Component.
|
|
* Fetches initial stats + activity on the server (SSR first paint), hands to
|
|
* the hydrated client View. Keeps the documented server-seed data flow.
|
|
*/
|
|
import { getActivity, getDashboardStats } from "@/lib/api/server";
|
|
import DashboardView from "./view";
|
|
|
|
export default async function DashboardPage() {
|
|
const [stats, activity] = await Promise.allSettled([
|
|
getDashboardStats().catch(() => undefined),
|
|
getActivity(14).catch(() => undefined),
|
|
]);
|
|
|
|
return (
|
|
<DashboardView
|
|
initialStats={
|
|
stats.status === "fulfilled" && stats.value ? stats.value : undefined
|
|
}
|
|
initialActivity={
|
|
activity.status === "fulfilled" && activity.value
|
|
? activity.value
|
|
: undefined
|
|
}
|
|
/>
|
|
);
|
|
}
|