aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/App.tsx
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-14 08:58:38 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-14 08:58:38 -0800
commite3c379d069ffa9661561d25cdbf2f5894a2f8ee8 (patch)
tree24d0e9f5610dd9c8f873c5b78e6bc1c88d32840a /frontend/src/App.tsx
parent4b06155fbde91a1bef6361ef36efb28789861928 (diff)
downloadneko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.tar.gz
neko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.tar.bz2
neko-e3c379d069ffa9661561d25cdbf2f5894a2f8ee8.zip
Refactor: project structure, implement dependency injection, and align v2 UI with v1
Diffstat (limited to 'frontend/src/App.tsx')
-rw-r--r--frontend/src/App.tsx42
1 files changed, 34 insertions, 8 deletions
diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx
index 9f53ace..4835cd3 100644
--- a/frontend/src/App.tsx
+++ b/frontend/src/App.tsx
@@ -35,21 +35,47 @@ import FeedList from './components/FeedList';
import FeedItems from './components/FeedItems';
import Settings from './components/Settings';
-function Dashboard({ theme, setTheme }: { theme: string, setTheme: (t: string) => void }) {
+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}`}>
+ <div
+ className={`dashboard ${sidebarVisible ? 'sidebar-visible' : 'sidebar-hidden'} theme-${theme}`}
+ >
<header className="dashboard-header">
- <h1 className="logo" onClick={() => setSidebarVisible(!sidebarVisible)} style={{ cursor: 'pointer' }}>🐱</h1>
+ <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={() => navigate('/settings')}
+ className="nav-link"
+ style={{
+ color: 'white',
+ marginRight: '1rem',
+ background: 'none',
+ border: 'none',
+ cursor: 'pointer',
+ fontSize: 'inherit',
+ fontFamily: 'inherit',
+ }}
+ >
+ Settings
+ </button>
- <button onClick={() => {
- fetch('/api/logout', { method: 'POST' })
- .then(() => window.location.href = '/v2/login');
- }} className="logout-btn">
+ <button
+ onClick={() => {
+ fetch('/api/logout', { method: 'POST' }).then(
+ () => (window.location.href = '/v2/login')
+ );
+ }}
+ className="logout-btn"
+ >
Logout
</button>
</nav>