diff --git a/client/src/App.tsx b/client/src/App.tsx index 0be805b..5639ec3 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -5,6 +5,7 @@ import { ThemeProvider } from '@/hooks/useTheme'; import { ToastProvider } from '@/components/Toast'; import ProtectedRoute from '@/components/ProtectedRoute'; import Navbar from '@/components/Navbar'; +import ThemeBubble from '@/components/ThemeBubble'; import LoginPage from '@/pages/LoginPage'; import RegisterPage from '@/pages/RegisterPage'; import FeedPage from '@/pages/FeedPage'; @@ -107,6 +108,7 @@ export default function App() { +
diff --git a/client/src/components/Navbar.tsx b/client/src/components/Navbar.tsx index df070dc..b0ebf15 100644 --- a/client/src/components/Navbar.tsx +++ b/client/src/components/Navbar.tsx @@ -1,26 +1,17 @@ import { Link, useLocation } from 'react-router-dom'; import { useAuth } from '@/hooks/useAuth'; -import { useTheme } from '@/hooks/useTheme'; import UserAvatar from '@/components/UserAvatar'; -import { Home, PlusSquare, Shield, Sun, Moon, Monitor } from 'lucide-react'; +import { Home, PlusSquare, Shield } from 'lucide-react'; export default function Navbar() { const { user } = useAuth(); - const { theme, setTheme } = useTheme(); const location = useLocation(); - const cycleTheme = () => { - const next: Record = { light: 'dark', dark: 'system', system: 'light' }; - setTheme(next[theme]); - }; - const ThemeIcon = theme === 'dark' ? Moon : theme === 'light' ? Sun : Monitor; - const themeLabel = theme === 'dark' ? 'Тёмная' : theme === 'light' ? 'Светлая' : 'Авто'; - if (!user) return null; - const isProfile = location.pathname.startsWith('/profile'); - const isFeed = location.pathname === '/feed' || location.pathname === '/'; + const isFeed = location.pathname === '/feed' || location.pathname === '/'; const isUpload = location.pathname === '/upload'; + const isProfile = location.pathname.startsWith('/profile'); return (