diff options
| author | Adam Mathes <adam@adammathes.com> | 2026-02-14 09:55:33 -0800 |
|---|---|---|
| committer | Adam Mathes <adam@adammathes.com> | 2026-02-14 09:55:33 -0800 |
| commit | ae2b06f7a702ea432b801985f534ade405d0299a (patch) | |
| tree | fe1fe5d2defe33785d0f6a74bce75c6a27ca628d /frontend/src/App.tsx | |
| parent | 6fa13a06411048f3217397f4285b3e64e7b9ee58 (diff) | |
| download | neko-ae2b06f7a702ea432b801985f534ade405d0299a.tar.gz neko-ae2b06f7a702ea432b801985f534ade405d0299a.tar.bz2 neko-ae2b06f7a702ea432b801985f534ade405d0299a.zip | |
ui: redesign sidebar to match v1 aesthetic and fix navigation
Diffstat (limited to 'frontend/src/App.tsx')
| -rw-r--r-- | frontend/src/App.tsx | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1c023c4..732d9ef 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { BrowserRouter, Routes, Route, Navigate, useLocation, useNavigate } from 'react-router-dom'; +import { BrowserRouter, Routes, Route, Navigate, useLocation } from 'react-router-dom'; import Login from './components/Login'; import './App.css'; import { apiFetch } from './utils'; @@ -37,53 +37,15 @@ import FeedItems from './components/FeedItems'; import Settings from './components/Settings'; function Dashboard({ theme, setTheme }: { theme: string; setTheme: (t: string) => void }) { - const navigate = useNavigate(); const [sidebarVisible, setSidebarVisible] = useState(true); return ( <div className={`dashboard ${sidebarVisible ? 'sidebar-visible' : 'sidebar-hidden'} theme-${theme}`} > - <header className="dashboard-header"> - <h1 - className="logo" - onClick={() => setSidebarVisible(!sidebarVisible)} - style={{ cursor: 'pointer' }} - > - 🐱 - </h1> - <nav> - <button - onClick={() => navigate('/settings')} - className="nav-link" - style={{ - color: 'white', - marginRight: '1rem', - background: 'none', - border: 'none', - cursor: 'pointer', - fontSize: 'inherit', - fontFamily: 'inherit', - }} - > - Settings - </button> - - <button - onClick={() => { - apiFetch('/api/logout', { method: 'POST' }).then( - () => (window.location.href = '/v2/login') - ); - }} - className="logout-btn" - > - Logout - </button> - </nav> - </header> <div className="dashboard-content"> <aside className={`dashboard-sidebar ${sidebarVisible ? '' : 'hidden'}`}> - <FeedList theme={theme} setTheme={setTheme} /> + <FeedList theme={theme} setTheme={setTheme} setSidebarVisible={setSidebarVisible} /> </aside> <main className="dashboard-main"> <Routes> |
