import DashboardLayout from "@/components/layout/DashboardLayout"; import { createClient } from "@/lib/supabase/server"; import { redirect } from "next/navigation"; export default async function PersonalDashboardLayout({ children, }: { children: React.ReactNode; }) { // Get the current user via Supabase const supabaseClient = createClient(); const { data: { user } } = await supabaseClient.auth.getUser(); // Redirect if not logged in if (!user) { redirect("/login"); } // Get the personal account details const { data: personalAccount } = await supabaseClient.rpc('get_personal_account'); // Define the navigation items for our agent-based UI const navigation = [ { name: "Home", href: "/dashboard", }, { name: "Agents", href: "/dashboard/agents", }, { name: "Devices", href: "/dashboard/devices", }, { name: "Data", href: "/dashboard/data", }, { name: "Settings", href: "/dashboard/settings", }, ]; // Right panel content const rightPanelContent = (

Account Status

Active

Recent Activity

); return ( {children} ); }