import { useEffect } from "react"; import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"; import { useConfig } from "./hooks"; import { useLoading } from "@/contexts/loading-context"; import { Providers } from "./components/Providers"; import { ChatModels } from "./components/ChatModels"; import { EmbeddingModels } from "./components/EmbeddingModels"; import { Others } from "./components/Others"; export function HomePage() { const { data: config, isLoading, error } = useConfig(); const { startLoading, stopLoading } = useLoading(); // Show loading screen during initial config load useEffect(() => { if (isLoading) { startLoading("Loading configuration..."); } else { stopLoading(); } return () => { stopLoading(); }; }, [isLoading, startLoading, stopLoading]); if (error) { return (

Failed to load configuration

Please try refreshing the page

); } return (
Providers Chat Models Embedding Models Others
); }