Добавлены новые зависимости, обновлены стили и улучшена структура проекта. Обновлен README с описанием функционала и технологий. Реализована анимация и адаптивный дизайн. Настроена авторизация с использованием Apollo Client.
This commit is contained in:
31
src/components/dashboard/dashboard.tsx
Normal file
31
src/components/dashboard/dashboard.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
"use client"
|
||||
|
||||
import { useState } from 'react'
|
||||
import { Sidebar } from './sidebar'
|
||||
import { UserSettings } from './user-settings'
|
||||
import { DashboardHome } from './dashboard-home'
|
||||
|
||||
export type DashboardSection = 'home' | 'settings'
|
||||
|
||||
export function Dashboard() {
|
||||
const [activeSection, setActiveSection] = useState<DashboardSection>('home')
|
||||
|
||||
const renderContent = () => {
|
||||
switch (activeSection) {
|
||||
case 'settings':
|
||||
return <UserSettings />
|
||||
case 'home':
|
||||
default:
|
||||
return <DashboardHome />
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-gradient-smooth flex">
|
||||
<Sidebar />
|
||||
<main className="flex-1 ml-64">
|
||||
{renderContent()}
|
||||
</main>
|
||||
</div>
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user