apix/app/page.tsx
Khoa.vo e69c6ba64d
Some checks are pending
CI / build (18.x) (push) Waiting to run
CI / build (20.x) (push) Waiting to run
chore: Remove Grok integration, simplify Settings UI
- Removed all Grok-related code, API routes, and services
- Removed crawl4ai service and meta-crawl client
- Simplified Settings to always show cookie inputs for Meta AI
- Hid advanced wrapper settings behind collapsible section
- Provider selection now only shows Whisk and Meta AI
- Fixed unused imports and type definitions
2026-01-07 19:21:51 +07:00

60 lines
1.7 KiB
TypeScript

"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 (
<div className="flex h-screen w-full bg-background text-foreground overflow-hidden font-sans flex-col">
{/* Top Navbar */}
<Navbar />
{/* Main Content Area */}
<main className="flex-1 relative flex flex-col h-full w-full overflow-hidden mt-16">
{/* Scrollable Container */}
<div className="flex-1 overflow-y-auto w-full scroll-smooth">
<div className="min-h-full w-full max-w-[1600px] mx-auto p-4 md:p-6 pb-20">
{/* Always show Hero on Create View */}
{currentView === 'gallery' && (
<>
<PromptHero />
<Gallery />
</>
)}
{currentView === 'settings' && <Settings />}
{currentView === 'library' && (
<PromptLibrary onSelect={(p) => setCurrentView('gallery')} />
)}
{currentView === 'history' && <UploadHistory />}
</div>
</div>
</main>
{/* Floating AI Chat */}
<GrokChat />
<CookieExpiredDialog />
</div>
);
}