From ca4ec576661ddf8e7adfa44befa95e28bb222fa6 Mon Sep 17 00:00:00 2001 From: Matthias Puchstein Date: Thu, 10 Jul 2025 00:01:04 +0200 Subject: [PATCH] modularized the `Record` component into a standalone file `Record.tsx`, updated `Home` and `App` to reflect the changes, and streamlined styles in `SplashScreen` for consistency and dynamic theming Signed-off-by: Matthias Puchstein --- src/App.tsx | 35 +-------------- src/components/SplashScreen.tsx | 15 ++++--- src/pages/Home.tsx | 75 +------------------------------ src/pages/Record.tsx | 78 +++++++++++++++++++++++++++++++++ 4 files changed, 90 insertions(+), 113 deletions(-) create mode 100644 src/pages/Record.tsx diff --git a/src/App.tsx b/src/App.tsx index 969b1af..fc9cd45 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,40 +10,7 @@ import DreamPage from "./pages/DreamPage.tsx"; import ProfilePage from "./pages/ProfilePage.tsx"; import Home from "./pages/Home.tsx"; import Overview from "./pages/Overview.tsx"; - -function Record() { - return ( -
-

Record Your Dream

- -
-
-
- - - -
-

Tap to start recording your dream

-

- Your voice will be transcribed automatically -

-
- -
- -
- - -
-
- ); -} +import {Record} from "./pages/Record.tsx"; function Archive() { return ( diff --git a/src/components/SplashScreen.tsx b/src/components/SplashScreen.tsx index 2c019e9..9985b54 100644 --- a/src/components/SplashScreen.tsx +++ b/src/components/SplashScreen.tsx @@ -1,4 +1,4 @@ -import { useEffect } from 'react'; +import {useEffect} from 'react'; import logo from '../assets/logo.svg'; import text from '../assets/text.svg'; @@ -17,15 +17,20 @@ export default function SplashScreen({ onFinished }: SplashScreenProps) { }, [onFinished]); return ( -
+
REMind Logo REMind Text
-
-
+
+

Loading your dreams...

); -} \ No newline at end of file +} diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index b54545b..71d38e1 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -1,13 +1,11 @@ -import {useState} from 'react'; import {mockDreams} from '../data/MockDreams'; import {MockUserMap} from '../data/MockUsers'; import {getSortedDreamsByDate} from '../utils/DreamUtils.ts'; import {primaryMoodCategories, topDreamTopics} from '../data/MockDailyHighlights'; -import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from '../styles/StyleUtils'; +import {getBackgroundStyle, getCardStyle, getTextStyle} from '../styles/StyleUtils'; import {formatDateFull, formatDateSimple} from '../utils/DateUtils'; export default function Home() { - const [inputMode, setInputMode] = useState<'text' | 'drawing'>('text'); const currentUser = MockUserMap.get(4); // Neo Quantum const currentDate = new Date(); const formattedDate = formatDateFull(currentDate); @@ -52,77 +50,6 @@ export default function Home() {
- {/* Input Card */} -
-
-

Neuer Traum

-
- - -
-
- - {inputMode === 'text' ? ( - - ) : ( -
-

Zeichne deinen Traum hier (Canvas-Platzhalter)

-
- )} - -
-
- - -
- -
-
- {/* Personal Feed */}
diff --git a/src/pages/Record.tsx b/src/pages/Record.tsx new file mode 100644 index 0000000..589d5de --- /dev/null +++ b/src/pages/Record.tsx @@ -0,0 +1,78 @@ +import {getAccentStyle, getBackgroundStyle, getCardStyle, getTextStyle} from "../styles/StyleUtils.ts"; +import {useState} from "react"; + +export function Record() { + const [inputMode, setInputMode] = useState<'text' | 'drawing'>('text'); + + return ( +
+
+

Neuer Traum

+
+ + +
+
+ + {inputMode === 'text' ? ( + + ) : ( +
+

Zeichne deinen Traum hier (Canvas-Platzhalter)

+
+ )} + +
+
+ + +
+ +
+
+ ); +}