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'; import { Settings } from 'lucide-react'; import Link from 'next/link'; 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 (
{/* Top controls */}
{/* Center content */}
{/* Title */}

Menu Application

{buttons.length > 0 && (

{buttons.length} application{buttons.length > 1 ? 's' : ''} disponible{buttons.length > 1 ? 's' : ''}

)}
{/* Grid */} {buttons.length === 0 ? (
🔗

Aucune application

Ajoutez vos raccourcis depuis l'administration.

Configurer →
) : (
{(buttons as any[]).map((btn) => ( ))}
)}
); }