2026-08-17 14:17:24 +02:00
|
|
|
import { ConfigError } from "@/lib/config/loader";
|
|
|
|
|
import { effectiveConfigStore } from "@/lib/config/effective";
|
2026-08-17 13:49:55 +02:00
|
|
|
import { Dashboard } from "@/components/layout/Dashboard";
|
|
|
|
|
|
|
|
|
|
export const dynamic = "force-dynamic";
|
|
|
|
|
|
|
|
|
|
export default function Home() {
|
|
|
|
|
let config;
|
|
|
|
|
try {
|
2026-08-17 14:17:24 +02:00
|
|
|
config = effectiveConfigStore.get();
|
2026-08-17 13:49:55 +02:00
|
|
|
} catch (err) {
|
|
|
|
|
const message = err instanceof ConfigError ? err.message : "Unknown configuration error";
|
|
|
|
|
return (
|
|
|
|
|
<main className="mx-auto flex max-w-2xl flex-col gap-4 px-6 py-16">
|
2026-08-17 17:21:18 +02:00
|
|
|
<h1 className="font-display text-lg font-semibold text-status-down">Configuration Error</h1>
|
|
|
|
|
<pre className="rounded-lg border border-status-down bg-surface p-4 text-sm whitespace-pre-wrap text-fg">
|
2026-08-17 13:49:55 +02:00
|
|
|
{message}
|
|
|
|
|
</pre>
|
|
|
|
|
</main>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return <Dashboard config={config} />;
|
|
|
|
|
}
|