From ff30258377ceec8a68fafcea9ec9f05a34ec4717 Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Sat, 12 Jul 2025 11:21:51 +0200 Subject: [PATCH] refactored `Record` component into `DreamRecord`, updated routes and navigation for consistency, and integrated `DreamRecord` into `Home`. Signed-off-by: Matthias Puchstein --- src/App.tsx | 3 +-- src/{pages/Record.tsx => components/DreamRecord.tsx} | 4 ++-- src/components/Navbar.tsx | 11 ++++++----- src/pages/Home.tsx | 3 +++ 4 files changed, 12 insertions(+), 9 deletions(-) rename src/{pages/Record.tsx => components/DreamRecord.tsx} (99%) diff --git a/src/App.tsx b/src/App.tsx index fc9cd45..d9fd0f3 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,7 +10,6 @@ import DreamPage from "./pages/DreamPage.tsx"; import ProfilePage from "./pages/ProfilePage.tsx"; import Home from "./pages/Home.tsx"; import Overview from "./pages/Overview.tsx"; -import {Record} from "./pages/Record.tsx"; function Archive() { return ( @@ -118,7 +117,7 @@ function AppContent() { }/> }/> }/> - }/> + }/> }/> }/> }/> diff --git a/src/pages/Record.tsx b/src/components/DreamRecord.tsx similarity index 99% rename from src/pages/Record.tsx rename to src/components/DreamRecord.tsx index 589d5de..06ac538 100644 --- a/src/pages/Record.tsx +++ b/src/components/DreamRecord.tsx @@ -1,7 +1,7 @@ -import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from "../styles/StyleUtils.ts"; import {useState} from "react"; +import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from "../styles/StyleUtils.ts"; -export function Record() { +export function DreamRecord() { const [inputMode, setInputMode] = useState<'text' | 'drawing'>('text'); return ( diff --git a/src/components/Navbar.tsx b/src/components/Navbar.tsx index 38879c5..9241d5e 100644 --- a/src/components/Navbar.tsx +++ b/src/components/Navbar.tsx @@ -1,5 +1,6 @@ import {NavLink} from 'react-router-dom'; -import {FaArchive, FaHome, FaList, FaMicrophone, FaUser} from "react-icons/fa"; +import {FaList, FaMicrochip, FaUser} from "react-icons/fa6"; +import {FaArchive, FaHome} from "react-icons/fa"; export default function Navbar() { return (<> @@ -9,8 +10,8 @@ export default function Navbar() { - - + +
@@ -22,11 +23,11 @@ export default function Navbar() { - + ); diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 1c0ae31..b1f8ef6 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -5,6 +5,7 @@ import {primaryMoodCategories, topDreamTopics} from '../data/MockDailyHighlights import {getBackgroundStyle, getCardStyle, getTextStyle} from '../styles/StyleUtils'; import {formatDateFull, formatDateSimple} from '../utils/DateUtils'; import {NavLink} from 'react-router-dom'; +import {DreamRecord} from "../components/DreamRecord.tsx"; export default function Home() { const currentUser = MockUserMap.get(4); // Neo Quantum @@ -51,6 +52,8 @@ export default function Home() { + + {/* Personal Feed */}