import { prisma } from '@/lib/db'; import { isConfigured } from '@/app/actions/setup'; import { redirect } from 'next/navigation'; import { MenuButton } from '@/components/MenuButton'; import { ThemeToggle } from '@/components/ThemeToggle'; export const dynamic = 'force-dynamic'; export default async function Home() { const configured = await isConfigured(); if (!configured) { redirect('/setup'); } const buttons = await prisma.button.findMany({ orderBy: { order: 'asc' }, }); return (

Application Menu

{buttons.length === 0 ? (

Aucune application configurée. Rendez-vous dans le panel admin.

Accéder à l'administration
) : (
{buttons.map((btn: any) => ( ))}
)}
); }