'use client'; import type { ProfileTab } from '@/components/profile/ProfileTabs'; import { DriverProfileTemplate } from '@/templates/DriverProfileTemplate'; import { EmptyTemplate, ErrorTemplate } from '@/templates/shared/StatusTemplates'; import { useRouter } from 'next/navigation'; import { useState } from 'react'; export function DriverProfilePageClient({ viewData, error, empty }: DriverProfilePageClientProps) { const router = useRouter(); // UI State (UI-only concerns) const [activeTab, setActiveTab] = useState('overview'); const [friendRequestSent, setFriendRequestSent] = useState(false); // Event handlers (UI-only concerns) const handleAddFriend = () => { setFriendRequestSent(true); }; const handleBackClick = () => { router.push('/drivers'); }; // Handle error/empty states if (error) { return ( ); } if (!viewData || !viewData.currentDriver) { if (empty) { return ( ); } return null; } // Pass ViewData directly to template return ( ); }