Download novelforge-sentinel-pro-react/src/components/Layout/Layout.tsx from luom2645/agent-workspace: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/novelforge-sentinel-pro-react/src/components/Layout/Layout.tsx
- Command line
-
hf download hf://luom2645/agent-workspace@7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/novelforge-sentinel-pro-react/src/components/Layout/Layout.tsx
-
curl -L -o Layout.tsx https://huggingface.co/luom2645/agent-workspace/resolve/7d4c5ffdb4518a5d7456ef06ab77458fcf42663a/novelforge-sentinel-pro-react/src/components/Layout/Layout.tsx
1.31 kB
| import React, { useState } from 'react'; | |
| import Sidebar from './Sidebar'; | |
| import CreationCenter from '../Sections/CreationCenter'; | |
| import ProjectManagement from '../Sections/ProjectManagement'; | |
| import AIModels from '../Sections/AIModels'; | |
| import Settings from '../Sections/Settings'; | |
| import AdminPanel from '../Sections/AdminPanel'; | |
| import { useAuth } from '../../hooks/useAuth'; | |
| const Layout: React.FC = () => { | |
| const [activeSection, setActiveSection] = useState('creation'); | |
| const { user } = useAuth(); | |
| const renderSection = () => { | |
| switch (activeSection) { | |
| case 'creation': | |
| return <CreationCenter />; | |
| case 'projects': | |
| return <ProjectManagement />; | |
| case 'ai-models': | |
| return <AIModels />; | |
| case 'settings': | |
| return <Settings />; | |
| case 'admin': | |
| return user?.role === 'admin' ? <AdminPanel /> : <CreationCenter />; | |
| default: | |
| return <CreationCenter />; | |
| } | |
| }; | |
| return ( | |
| <div className="flex min-h-screen bg-primary-bg"> | |
| <Sidebar | |
| activeSection={activeSection} | |
| onSectionChange={setActiveSection} | |
| /> | |
| <main className="flex-1 ml-80 p-8"> | |
| <div className="max-w-7xl mx-auto"> | |
| {renderSection()} | |
| </div> | |
| </main> | |
| </div> | |
| ); | |
| }; | |
| export default Layout; |