"use client"; import { useEffect } from 'react'; import { useStore } from '@/lib/store'; import { Navbar } from "@/components/Navbar"; import { Gallery } from "@/components/Gallery"; import { PromptHero } from "@/components/PromptHero"; import { Settings } from "@/components/Settings"; import { PromptLibrary } from "@/components/PromptLibrary"; import { UploadHistory } from "@/components/UploadHistory"; import { GrokChat } from "@/components/GrokChat"; import { CookieExpiredDialog } from "@/components/CookieExpiredDialog"; export default function Home() { const { currentView, setCurrentView, loadGallery } = useStore(); useEffect(() => { loadGallery(); }, [loadGallery]); return (
{/* Top Navbar */} {/* Main Content Area */}
{/* Scrollable Container */}
{/* Always show Hero on Create View */} {currentView === 'gallery' && ( <> )} {currentView === 'settings' && } {currentView === 'library' && ( setCurrentView('gallery')} /> )} {currentView === 'history' && }
{/* Floating AI Chat */}
); }