'use client' import { Home } from 'lucide-react' import { useRouter } from 'next/navigation' import { useEffect } from 'react' import { useAuth } from '../lib/auth/hooks' import { useProjectStore } from '../lib/projects/store' import { ProfileDropdown } from './profile-dropdown' /** * CloudSaveButton - Shows authentication state and project management * * Guest: Shows "Home" button * Authenticated: Shows ProfileDropdown */ export function CloudSaveButton() { const { isAuthenticated, isLoading } = useAuth() const initialize = useProjectStore(state => state.initialize) const router = useRouter() // Initialize project store when authenticated useEffect(() => { if (isAuthenticated) { initialize() } }, [isAuthenticated, initialize]) if (isLoading) { return (