introduced Record page and /record route, updated Navbar with new microphone button redirecting to Record, and commented out unused DreamRecord in Home for cleaner structure

Signed-off-by: Matthias Puchstein <matthias@puchstein.bayern>
This commit is contained in:
2025-07-12 16:15:27 +02:00
parent d6e6b1ccb4
commit 36bb04cfa9
3 changed files with 14 additions and 6 deletions

View File

@@ -18,6 +18,7 @@ import Technology from "./pages/dreamarchive/Technology.tsx";
import UserDreams from "./pages/dreamarchive/UserDreams.tsx";
import ResearchLive from "./pages/dreamarchive/ResearchLive.tsx";
import ScrollToTop from "./components/ScrollToTop.tsx";
import {DreamRecord} from "./components/DreamRecord.tsx";
export default function App() {
const [isLoading, setIsLoading] = useState(true);
@@ -40,6 +41,13 @@ export default function App() {
);
}
function Record() {
return (
<div className="page p-4 space-y-6">
<DreamRecord/>
</div>)
}
// Separate component to use useLocation hook
function AppContent() {
const location = useLocation();
@@ -56,6 +64,7 @@ function AppContent() {
<Route path="/home" element={<Home/>}/>
<Route path="/feed" element={<Feed/>}/>
<Route path="/chip" element={<ChipOverview/>}/>
<Route path="/record" element={<Record/>}/>
<Route path="/dreamarchive" element={<DreamArchiveIndex/>}/>
<Route path="/dreamarchive/worldwide-events" element={<WorldwideEvents/>}/>
<Route path="/dreamarchive/cultural-landscapes" element={<CulturalLandscapes/>}/>

View File

@@ -1,5 +1,5 @@
import {NavLink} from 'react-router-dom';
import {FaList, FaMicrochip, FaUser} from "react-icons/fa6";
import {FaMicrochip, FaMicrophone, FaUser} from "react-icons/fa6";
import {FaGlobeEurope, FaHome} from "react-icons/fa";
import {getBackgroundStyle} from '../styles/StyleUtils';
@@ -27,11 +27,11 @@ export default function Navbar() {
</nav>
<NavLink
to="/feed"
to="/record"
className="microphone-button fixed bottom-6 left-1/2 transform -translate-x-1/2 p-4 md:p-5 rounded-full z-60 transition-transform hover:scale-110 floating"
style={getBackgroundStyle('cta')}
>
<FaList className="w-8 h-8 md:w-10 md:h-10 text-white"/>
<FaMicrophone className="w-8 h-8 md:w-10 md:h-10 text-white"/>
</NavLink>
</>
);

View File

@@ -4,7 +4,6 @@ import {getSortedDreamsByDate} from '../utils/DreamUtils.ts';
import {getBackgroundStyle, getCardStyle, getTextStyle} from '../styles/StyleUtils';
import {formatDateFull} from '../utils/DateUtils';
import {NavLink} from 'react-router-dom';
import {DreamRecord} from "../components/DreamRecord.tsx";
import {DreamCardCompact} from "../components/DreamCardCompact.tsx";
import {DailyHighlights} from "../components/DailyHighlights.tsx";
import {ChipCard} from "../components/ChipCard.tsx";
@@ -53,7 +52,7 @@ export default function Home() {
</div>
</div>
<DreamRecord/>
{/*<DreamRecord/>*/}
{/* Personal Feed */}
<NavLink to='/feed'
@@ -101,7 +100,7 @@ export default function Home() {
</NavLink>
{/* Daily Highlights */}
<NavLink to='/archive'>
<NavLink to='/dreamarchive/user-dreams'>
<DailyHighlights/>
</NavLink>