import { AdminDashboardPageQuery } from '@/lib/page-queries/AdminDashboardPageQuery'; import { AdminDashboardTemplate } from '@/templates/AdminDashboardTemplate'; export default async function AdminPage() { const result = await AdminDashboardPageQuery.execute(); if (result.isErr()) { const error = result.getError(); if (error === 'notFound') { return (
Access denied - You must be logged in as an Owner or Admin
); } return (
Failed to load dashboard: {error}
); } const viewData = result.unwrap(); // For now, use empty callbacks. In a real app, these would be Server Actions // that trigger revalidation or navigation return {}} isLoading={false} />; }