feat: implement Focus Mode (Speed Read) with swipeable card deck

This commit is contained in:
Michael committed 2026-02-12 11:56:16 +01:00
1 parent bee0d901f7
commit a512173f05
11 files changed
+667 -5

No files matched your search

+12 -3
View File
@@ -1,19 +1,28 @@
import { useState } from 'react';
import { Sidebar } from '../components/Sidebar';
import { DashboardPage } from '../pages/DashboardPage';
import { FocusPage } from '../pages/FocusPage';
export function RootLayout() {
const [selectedFeedId, setSelectedFeedId] = useState<string | null>(null);
const [isFocusMode, setIsFocusMode] = useState(false);
return (
<div className="flex h-screen bg-carbon overflow-hidden">
<Sidebar
onSelectFeed={setSelectedFeedId}
selectedFeedId={selectedFeedId}
onEnterFocus={() => setIsFocusMode(true)}
isFocusMode={isFocusMode}
/>
<DashboardPage
selectedFeedId={selectedFeedId}
/>
{isFocusMode ? (
<FocusPage onExit={() => setIsFocusMode(false)} />
) : (
<DashboardPage
selectedFeedId={selectedFeedId}
onEnterFocus={() => setIsFocusMode(true)}
/>
)}
</div>
);
}