- Build complete Next.js CRM for commercial real estate - Add authentication with JWT sessions and role-based access - Add GoHighLevel API integration for contacts, conversations, opportunities - Add AI-powered Control Center with tool calling - Add Setup page with onboarding checklist (/setup) - Add sidebar navigation with Setup menu item - Fix type errors in onboarding API, GHL services, and control center tools - Add Prisma schema with SQLite for local development - Add UI components with clay morphism design system Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
447 B
TypeScript
20 lines
447 B
TypeScript
'use client';
|
|
|
|
import { ProtectedRoute } from '@/components/auth/ProtectedRoute';
|
|
|
|
export default function AdminLayout({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<ProtectedRoute
|
|
requireAdmin
|
|
redirectTo="/dashboard"
|
|
fallback={
|
|
<div className="p-8 text-center">
|
|
<p className="text-gray-500">Checking permissions...</p>
|
|
</div>
|
|
}
|
|
>
|
|
{children}
|
|
</ProtectedRoute>
|
|
);
|
|
}
|