feat: add first-run admin setup

This commit is contained in:
i vib committed 2026-10-25 06:12:47 -07:00
1 parent dd2fc71867
commit 2aaa9335e3
16 files changed
+644 -152

No files matched your search

+11 -2
View File
@@ -3,8 +3,17 @@ import { Features } from '@/components/sections/Features';
import { Hero } from '@/components/sections/Hero';
import { LandingAbout } from '@/components/sections/LandingAbout';
import { SdkSection } from '@/components/sections/SdkSection';
import { isAdminSetupComplete } from '@/core/auth/adminUsers';
import { redirect } from 'next/navigation';
export const dynamic = 'force-dynamic';
export default async function LandingPage() {
if (process.env.NODE_ENV === 'production' && process.env.DATABASE_URL) {
const isConfigured = await isAdminSetupComplete().catch(() => false);
if (!isConfigured) redirect('/vcon/setup');
}
export default function LandingPage() {
return (
<MainLayout>
<Hero />
@@ -13,4 +22,4 @@ export default function LandingPage() {
<LandingAbout />
</MainLayout>
);
}
}