diff --git a/src/components/PortfolioChart.tsx b/src/components/PortfolioChart.tsx deleted file mode 100644 index bd98cfa..0000000 --- a/src/components/PortfolioChart.tsx +++ /dev/null @@ -1,175 +0,0 @@ -// src/components/PortfolioChart.tsx -import { useEffect, useState } from "react"; -import { - CartesianGrid, - Legend, - Line, - LineChart, - ResponsiveContainer, - Tooltip, - XAxis, - YAxis, -} from "recharts"; -import { PortfolioHolding } from "@/model/PortfolioHolding"; -import { Asset } from "@/model/Asset"; -import { Decision } from "@/model/Decision"; -import { AssetsHttpService } from "@/services/assets-http-service"; -import { format } from "date-fns"; - -const assetsService = new AssetsHttpService(); - -interface BaseChartData { - date: string; - autoinvested: number; - noAutoinvested: number; -} - -interface PortfolioChartProps { - holdings: PortfolioHolding[]; - assetsMap: Record; - decisionsMap: Record; -} - -export function PortfolioChart({ - holdings, - assetsMap, - decisionsMap, - }: PortfolioChartProps) { - const [chartData, setChartData] = useState([]); - - useEffect(() => { - async function buildChart() { - // ───── Build full date range ───── - const allDecisionDates: Date[] = []; - Object.values(decisionsMap).forEach((arr) => - arr.forEach((d) => allDecisionDates.push(d.date)) - ); - const buyDates = holdings.map( - () => new Date(Date.now() - 7 * 86_400_000) // today − 7d - ); - const allTimes = [...allDecisionDates, ...buyDates]; - if (!allTimes.length) return setChartData([]); - - const minDate = allTimes.reduce((a, b) => (a < b ? a : b)); - const maxDate = new Date(); // today - - const allDates: string[] = []; - const dataByDate: Record< - string, - { autoinvested: number; noAutoinvested: number } - > = {}; - for (let d = new Date(minDate); d <= maxDate; d.setDate(d.getDate() + 1)) { - const iso = d.toISOString().split("T")[0]; - allDates.push(iso); - dataByDate[iso] = { autoinvested: 0, noAutoinvested: 0 }; - } - - // ───── Simulate each holding ───── - for (const h of holdings) { - const asset = assetsMap[h.assetId]; - if (!asset) continue; - - let cashForAuto = h.amount * h.boughtPrice; - let sharesHeld = h.amount; - const initialNoAuto = h.amount * h.boughtPrice; - const decisions = decisionsMap[h.assetId] || []; - - for (const dateISO of allDates) { - const dayDecisions = decisions - .filter((d) => d.date.toISOString().startsWith(dateISO)) - .sort((a, b) => a.date.getTime() - b.date.getTime()); - - for (const dec of dayDecisions) { - const { price: px } = await assetsService.getPrice( - h.assetId, - dec.date - ); - if (dec.type === "BUY") { - const bought = Math.trunc(cashForAuto / px); - cashForAuto -= bought * px; - sharesHeld += bought; - } else if (dec.type === "SELL") { - cashForAuto += sharesHeld * px; - sharesHeld = 0; - } - } - - const { price: eodPx } = await assetsService.getPrice( - h.assetId, - new Date(`${dateISO}T23:59:59Z`) - ); - dataByDate[dateISO].autoinvested += cashForAuto + sharesHeld * eodPx; - dataByDate[dateISO].noAutoinvested += initialNoAuto + sharesHeld * eodPx; - } - } - - const out = allDates.map((iso) => ({ - date: format(new Date(iso), "MM/dd"), - autoinvested: dataByDate[iso].autoinvested / 100, - noAutoinvested: dataByDate[iso].noAutoinvested / 100, - })); - setChartData(out); - } - - if ( - holdings.length && - Object.keys(assetsMap).length && - Object.keys(decisionsMap).length - ) { - buildChart().catch(console.error); - } else { - setChartData([]); - } - }, [holdings, assetsMap, decisionsMap]); - - if (!chartData.length) { - return
Loading chart…
; - } - - return ( -
- - - - - `$${v.toLocaleString()}`} - /> - [ - `$${v.toLocaleString()}`, - n === "autoinvested" ? "Autoinvested" : "No Autoinvested", - ]} - /> - - - - - -
- ); -} diff --git a/src/components/AddAssetForm.tsx b/src/components/dashboard/AddAssetForm.tsx similarity index 94% rename from src/components/AddAssetForm.tsx rename to src/components/dashboard/AddAssetForm.tsx index 3221040..a6367b1 100644 --- a/src/components/AddAssetForm.tsx +++ b/src/components/dashboard/AddAssetForm.tsx @@ -1,16 +1,16 @@ // src/components/AddAssetForm.tsx import { useState } from "react"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; +import { Button } from "@/components/ui/button.tsx"; +import { Input } from "@/components/ui/input.tsx"; import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, -} from "@/components/ui/select"; -import { useToast } from "@/hooks/use-toast"; -import { Asset } from "@/model/Asset"; +} from "@/components/ui/select.tsx"; +import { useToast } from "@/hooks/use-toast.ts"; +import { Asset } from "@/model/Asset.ts"; interface AddAssetFormProps { availableAssets: Asset[]; diff --git a/src/components/AlertCard.tsx b/src/components/dashboard/AlertCard.tsx similarity index 90% rename from src/components/AlertCard.tsx rename to src/components/dashboard/AlertCard.tsx index 52baaf0..dc34bfb 100644 --- a/src/components/AlertCard.tsx +++ b/src/components/dashboard/AlertCard.tsx @@ -1,6 +1,6 @@ // src/components/AlertCard.tsx -import { Card, CardContent } from "@/components/ui/card"; -import { Badge } from "@/components/ui/badge"; +import { Card, CardContent } from "@/components/ui/card.tsx"; +import { Badge } from "@/components/ui/badge.tsx"; interface AlertCardProps { stock: string; diff --git a/src/components/AssetTable.tsx b/src/components/dashboard/AssetTable.tsx similarity index 96% rename from src/components/AssetTable.tsx rename to src/components/dashboard/AssetTable.tsx index 53aafbb..ee3a757 100644 --- a/src/components/AssetTable.tsx +++ b/src/components/dashboard/AssetTable.tsx @@ -1,14 +1,14 @@ // src/components/AssetTable.tsx import { useEffect, useState } from "react"; -import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge.tsx"; +import { Button } from "@/components/ui/button.tsx"; import { Pencil } from "lucide-react"; -import { PortfolioHolding } from "@/model/PortfolioHolding"; -import { Asset } from "@/model/Asset"; -import { AssetsHttpService } from "@/services/assets-http-service"; -import { DecisionHttpService } from "@/services/decision-http-service"; -import { UsersHttpService } from "@/services/users-http-service"; +import { PortfolioHolding } from "@/model/PortfolioHolding.ts"; +import { Asset } from "@/model/Asset.ts"; +import { AssetsHttpService } from "@/services/assets-http-service.ts"; +import { DecisionHttpService } from "@/services/decision-http-service.ts"; +import { UsersHttpService } from "@/services/users-http-service.ts"; const assetsService = new AssetsHttpService(); const decisionService = new DecisionHttpService(); diff --git a/src/components/LoadingLayer.tsx b/src/components/dashboard/LoadingLayer.tsx similarity index 100% rename from src/components/LoadingLayer.tsx rename to src/components/dashboard/LoadingLayer.tsx diff --git a/src/components/NewsCard.tsx b/src/components/dashboard/NewsCard.tsx similarity index 83% rename from src/components/NewsCard.tsx rename to src/components/dashboard/NewsCard.tsx index 2cf9751..a1e0bbf 100644 --- a/src/components/NewsCard.tsx +++ b/src/components/dashboard/NewsCard.tsx @@ -1,16 +1,8 @@ -// src/components/NewsCard.tsx -import { Card, CardContent } from "@/components/ui/card"; -import { Badge } from "@/components/ui/badge"; -import { Button } from "@/components/ui/button"; +import { Card, CardContent } from "@/components/ui/card.tsx"; +import { Badge } from "@/components/ui/badge.tsx"; +import { Button } from "@/components/ui/button.tsx"; import { ExternalLink } from "lucide-react"; -/** - * Props: - * - stocks: string[] (e.g. ["AAPL", "TSLA"]) - * - title: string - * - timestamp: string (already formatted) - * - url: string (link to the original news) - */ interface NewsCardProps { stocks: string[]; title: string; diff --git a/src/components/RequireAuth.tsx b/src/components/dashboard/RequireAuth.tsx similarity index 88% rename from src/components/RequireAuth.tsx rename to src/components/dashboard/RequireAuth.tsx index 9c4e3af..559fd25 100644 --- a/src/components/RequireAuth.tsx +++ b/src/components/dashboard/RequireAuth.tsx @@ -1,7 +1,7 @@ import {Navigate, useLocation} from "react-router-dom"; import {ReactNode} from "react"; import useAuth from "@/hooks/useAuth.ts"; -import {LoadingLayer} from "@/components/LoadingLayer.tsx"; +import {LoadingLayer} from "@/components/dashboard/LoadingLayer.tsx"; export function RequireAuth({children}: { children: ReactNode }) { const {isAuthenticated, loading} = useAuth(); diff --git a/src/components/SimulationPanel.tsx b/src/components/dashboard/SimulationPanel.tsx similarity index 93% rename from src/components/SimulationPanel.tsx rename to src/components/dashboard/SimulationPanel.tsx index 81315d9..136650a 100644 --- a/src/components/SimulationPanel.tsx +++ b/src/components/dashboard/SimulationPanel.tsx @@ -5,23 +5,23 @@ import { CardContent, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; +} from "@/components/ui/card.tsx"; +import { Button } from "@/components/ui/button.tsx"; import { Calendar as CalendarIcon } from "lucide-react"; import { Popover, PopoverContent, PopoverTrigger, -} from "@/components/ui/popover"; -import { Calendar } from "@/components/ui/calendar"; -import { cn } from "@/lib/utils"; -import { Badge } from "@/components/ui/badge"; +} from "@/components/ui/popover.tsx"; +import { Calendar } from "@/components/ui/calendar.tsx"; +import { cn } from "@/lib/utils.ts"; +import { Badge } from "@/components/ui/badge.tsx"; -import { PortfolioHolding } from "@/model/PortfolioHolding"; +import { PortfolioHolding } from "@/model/PortfolioHolding.ts"; import { DateRange } from "react-day-picker"; import { format } from "date-fns"; -import { SimulationResults } from "@/components/SimulationResults"; +import { SimulationResults } from "@/components/dashboard/SimulationResults.tsx"; interface SimulationPanelProps { holdings: PortfolioHolding[]; diff --git a/src/components/SimulationResults.tsx b/src/components/dashboard/SimulationResults.tsx similarity index 97% rename from src/components/SimulationResults.tsx rename to src/components/dashboard/SimulationResults.tsx index 031a118..956d16c 100644 --- a/src/components/SimulationResults.tsx +++ b/src/components/dashboard/SimulationResults.tsx @@ -4,8 +4,8 @@ import { CardContent, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; +} from "@/components/ui/card.tsx"; +import { Button } from "@/components/ui/button.tsx"; import { CartesianGrid, Legend, @@ -22,7 +22,7 @@ import { SelectItem, SelectTrigger, SelectValue, -} from "@/components/ui/select"; +} from "@/components/ui/select.tsx"; import { ArrowLeft } from "lucide-react"; /** diff --git a/src/components/dashboard/index.ts b/src/components/dashboard/index.ts new file mode 100644 index 0000000..0007a5f --- /dev/null +++ b/src/components/dashboard/index.ts @@ -0,0 +1,6 @@ +export { AddAssetForm } from "./AddAssetForm.tsx"; +export { AlertCard } from "./AlertCard.tsx"; +export { AssetTable } from "./AssetTable.tsx"; +export { NewsCard } from "./NewsCard.tsx"; +export { SimulationPanel } from "./SimulationPanel.tsx"; +export { SimulationResults } from "./SimulationResults.tsx"; \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts deleted file mode 100644 index a8da4e8..0000000 --- a/src/components/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -export { AddAssetForm } from "./AddAssetForm"; -export { AlertCard } from "./AlertCard"; -export { AssetTable } from "./AssetTable"; -export { NewsCard } from "./NewsCard"; -export { PortfolioChart } from "./PortfolioChart"; -export { SimulationPanel } from "./SimulationPanel"; -export { SimulationResults } from "./SimulationResults"; \ No newline at end of file diff --git a/src/components/DashboardPreview.tsx b/src/components/landpage/DashboardPreview.tsx similarity index 99% rename from src/components/DashboardPreview.tsx rename to src/components/landpage/DashboardPreview.tsx index 23ded79..fa6c037 100644 --- a/src/components/DashboardPreview.tsx +++ b/src/components/landpage/DashboardPreview.tsx @@ -1,4 +1,4 @@ -import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card.tsx"; import { TrendingUp, DollarSign, BarChart3 } from "lucide-react"; const DashboardPreview = () => { diff --git a/src/components/Hero.tsx b/src/components/landpage/Hero.tsx similarity index 96% rename from src/components/Hero.tsx rename to src/components/landpage/Hero.tsx index 0c8976c..87affa7 100644 --- a/src/components/Hero.tsx +++ b/src/components/landpage/Hero.tsx @@ -1,4 +1,4 @@ -import { Button } from "@/components/ui/button"; +import { Button } from "@/components/ui/button.tsx"; import { Link } from "react-router-dom"; import useAuth from "@/hooks/useAuth.ts"; import { ArrowRightIcon } from "lucide-react"; diff --git a/src/pages/webapp/Dashboard.tsx b/src/pages/Dashboard.tsx similarity index 72% rename from src/pages/webapp/Dashboard.tsx rename to src/pages/Dashboard.tsx index 4a381f0..6c48eff 100644 --- a/src/pages/webapp/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -6,16 +6,16 @@ import { CardContent, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { Badge } from "@/components/ui/badge"; +} from "@/components/ui/card.tsx"; +import { Button } from "@/components/ui/button.tsx"; +import { Badge } from "@/components/ui/badge.tsx"; import { AddAssetForm, AlertCard, AssetTable, NewsCard, SimulationPanel, -} from "@/components"; +} from "@/components/dashboard"; import { PortfolioHttpService } from "@/services/portfolio-http-service"; import { AssetsHttpService } from "@/services/assets-http-service"; @@ -32,7 +32,8 @@ import { Decision } from "@/model/Decision"; import { User } from "@/model/User"; import { - AlertTriangle, ChevronRight, + AlertTriangle, + ChevronRight, Newspaper, Play, User as UserIcon, @@ -83,13 +84,15 @@ export default function Dashboard() { const distinct = [...new Set(holdings.map((h) => h.assetId))]; const assets = await Promise.all(distinct.map((id) => assetsService.getAsset(id))); - setAssetsMap(assets.reduce>((acc, a) => ({ ...acc, [a.assetId]: a }), {})); + setAssetsMap( + assets.reduce>((acc, a) => ({ ...acc, [a.assetId]: a }), {}) + ); const decisionsObj: Record = {}; await Promise.all( distinct.map(async (assetId) => { decisionsObj[assetId] = await decisionService.getDecisions(assetId, user.riskLevel); - }), + }) ); setDecisionsMap(decisionsObj); })().catch(console.error); @@ -108,7 +111,9 @@ export default function Dashboard() { const missing = [...ids].filter((id) => !(id in assetsMap)); if (missing.length) { const newAssets = await Promise.all(missing.map((id) => assetsService.getAsset(id))); - setAssetsMap((prev) => newAssets.reduce((acc, a) => ({ ...acc, [a.assetId]: a }), prev)); + setAssetsMap((prev) => + newAssets.reduce((acc, a) => ({ ...acc, [a.assetId]: a }), prev) + ); } })().catch(console.error); }, []); // eslint-disable-line react-hooks/exhaustive-deps @@ -116,13 +121,39 @@ export default function Dashboard() { /* ------------------------------------------------------------------ * Derived data helpers * ----------------------------------------------------------------*/ - const todaysNews = useMemo(() => newsItems.filter((n) => isToday(new Date(n.date))), [newsItems]); - const latestNewsItem = useMemo(() => [...newsItems].sort((a, b) => +new Date(b.date) - +new Date(a.date))[0], [newsItems]); - const recentAlerts = useMemo(() => alerts.filter((a) => +new Date(a.date) >= Date.now() - 86_400_000), [alerts]); - const latestAlert = useMemo(() => [...alerts].sort((a, b) => +new Date(b.date) - +new Date(a.date))[0], [alerts]); + const todaysNews = useMemo( + () => newsItems.filter((n) => isToday(new Date(n.date))), + [newsItems] + ); + const latestNewsItem = useMemo( + () => + [...newsItems].sort((a, b) => +new Date(b.date) - +new Date(a.date))[0], + [newsItems] + ); + const recentAlerts = useMemo( + () => alerts.filter((a) => +new Date(a.date) >= Date.now() - 86_400_000), + [alerts] + ); + const latestAlert = useMemo( + () => + [...alerts].sort((a, b) => +new Date(b.date) - +new Date(a.date))[0], + [alerts] + ); - const latestNewsTickers = useMemo(() => (latestNewsItem ? [assetsMap[latestNewsItem.assetId]?.ticker].filter(Boolean) : []), [latestNewsItem, assetsMap]); - const latestAlertsTickers = useMemo(() => (latestAlert ? [assetsMap[latestAlert.assetId]?.ticker].filter(Boolean) : []), [latestAlert, assetsMap]); + const latestNewsTickers = useMemo( + () => + latestNewsItem + ? [assetsMap[latestNewsItem.assetId]?.ticker].filter(Boolean) + : [], + [latestNewsItem, assetsMap] + ); + const latestAlertsTickers = useMemo( + () => + latestAlert + ? [assetsMap[latestAlert.assetId]?.ticker].filter(Boolean) + : [], + [latestAlert, assetsMap] + ); const formatTimestamp = (d: string | Date) => format(new Date(d), "MMM d, yyyy ‧ hh:mm a"); @@ -130,11 +161,12 @@ export default function Dashboard() { * Helpers * ----------------------------------------------------------------*/ const BaseLayout: React.FC<{ children: React.ReactNode }> = ({ children }) => ( -
- {children} +
+
{children}
); + /* ------------------------------------------------------------------ * Conditional routes (Simulation, News, Alerts) * ----------------------------------------------------------------*/ @@ -143,7 +175,11 @@ export default function Dashboard() {
-

Portfolio Simulation

@@ -167,7 +203,11 @@ export default function Dashboard() {
-

Market News

@@ -181,7 +221,13 @@ export default function Dashboard() {
{newsItems.map((n) => ( - + ))}
@@ -193,7 +239,11 @@ export default function Dashboard() {
-

Portfolio Alerts

@@ -208,8 +258,20 @@ export default function Dashboard() {
{alerts.map((a) => { const asset = assetsMap[a.assetId]; - const msg = a.type === "BUY" ? "Technical indicators suggest buying opportunity" : a.type === "SELL" ? "Technical indicators suggest selling opportunity" : "Technical indicators suggest no change"; - return ; + const msg = + a.type === "BUY" + ? "Technical indicators suggest buying opportunity" + : a.type === "SELL" + ? "Technical indicators suggest selling opportunity" + : "Technical indicators suggest no change"; + return ( + + ); })}
@@ -225,10 +287,15 @@ export default function Dashboard() {

AutoInvestor

- Portfolio Management + + Portfolio Management +
- @@ -241,9 +308,9 @@ export default function Dashboard() {
- {/* Content area – subtract header height (56 px) from viewport */} -
-
+ {/* Content area – no forced 100vh height */} +
+
{/* -------------------- MAIN (Holdings) -------------------- */} @@ -267,7 +334,7 @@ export default function Dashboard() { {/* -------------------- SIDEBAR -------------------- */} -
+
{/* Quick Actions */} @@ -277,7 +344,11 @@ export default function Dashboard() { { - await portfolioService.createHolding({ assetId, amount: shares, boughtPrice: Math.round(price * 100) }); + await portfolioService.createHolding({ + assetId, + amount: shares, + boughtPrice: Math.round(price * 100), + }); setPortfolioHoldings(await portfolioService.getPortfolioHoldings()); }} /> @@ -285,7 +356,10 @@ export default function Dashboard() { {/* News */} - setShowDetailedNews(true)} className="bg-card border-border hover:bg-muted/50 transition-colors cursor-pointer"> + setShowDetailedNews(true)} + className="bg-card border-border hover:bg-muted/50 transition-colors cursor-pointer" + >
@@ -294,14 +368,18 @@ export default function Dashboard() {

Market News

-

{todaysNews.length} new articles today

+

+ {todaysNews.length} new articles today +

{latestNewsItem ? ( <> -

Latest: {latestNewsItem.title}

+

+ Latest: {latestNewsItem.title} +

{latestNewsTickers.map((t) => ( @@ -317,7 +395,10 @@ export default function Dashboard() { {/* Alerts */} - setShowDetailedAlerts(true)} className="bg-card border-border hover:bg-muted/50 transition-colors cursor-pointer"> + setShowDetailedAlerts(true)} + className="bg-card border-border hover:bg-muted/50 transition-colors cursor-pointer" + >
@@ -326,7 +407,9 @@ export default function Dashboard() {

Portfolio Alerts

-

{recentAlerts.length} alerts in the last day

+

+ {recentAlerts.length} alerts in the last day +

@@ -334,7 +417,12 @@ export default function Dashboard() { {latestAlert ? ( <>

- Latest: {latestAlert.type === "BUY" ? "Buy opportunity" : latestAlert.type === "SELL" ? "Sell opportunity" : "No change"} + Latest:{" "} + {latestAlert.type === "BUY" + ? "Buy opportunity" + : latestAlert.type === "SELL" + ? "Sell opportunity" + : "No change"}

{latestAlertsTickers.map((t) => ( @@ -354,4 +442,4 @@ export default function Dashboard() {
); -} \ No newline at end of file +} diff --git a/src/pages/Landing.tsx b/src/pages/Landing.tsx index 97ff198..0f9b57c 100644 --- a/src/pages/Landing.tsx +++ b/src/pages/Landing.tsx @@ -1,5 +1,5 @@ -import Hero from "@/components/Hero"; -import DashboardPreview from "@/components/DashboardPreview"; +import Hero from "@/components/landpage/Hero.tsx"; +import DashboardPreview from "@/components/landpage/DashboardPreview.tsx"; function Landing() { diff --git a/src/pages/webapp/Profile.tsx b/src/pages/Profile.tsx similarity index 94% rename from src/pages/webapp/Profile.tsx rename to src/pages/Profile.tsx index a67e016..df6d3b7 100644 --- a/src/pages/webapp/Profile.tsx +++ b/src/pages/Profile.tsx @@ -6,16 +6,16 @@ import { CardContent, CardHeader, CardTitle, -} from "@/components/ui/card"; -import { Button } from "@/components/ui/button"; -import { Input } from "@/components/ui/input"; -import { Label } from "@/components/ui/label"; -import { Badge } from "@/components/ui/badge"; +} from "@/components/ui/card.tsx"; +import { Button } from "@/components/ui/button.tsx"; +import { Input } from "@/components/ui/input.tsx"; +import { Label } from "@/components/ui/label.tsx"; +import { Badge } from "@/components/ui/badge.tsx"; import { ArrowLeft } from "lucide-react"; -import { UsersHttpService } from "@/services/users-http-service"; -import { User } from "@/model/User"; +import { UsersHttpService } from "@/services/users-http-service.ts"; +import { User } from "@/model/User.ts"; const usersService = new UsersHttpService(); diff --git a/src/routes.tsx b/src/routes.tsx index 2093960..ff66142 100644 --- a/src/routes.tsx +++ b/src/routes.tsx @@ -1,14 +1,13 @@ import {createBrowserRouter} from "react-router-dom"; import Landing from "@/pages/Landing.tsx"; import NotFound from "@/pages/NotFound.tsx"; -import Dashboard from "@/pages/webapp/Dashboard.tsx"; -import Profile from "@/pages/webapp/Profile.tsx"; -import {RequireAuth} from "@/components/RequireAuth.tsx"; +import Dashboard from "@/pages/Dashboard.tsx"; +import Profile from "@/pages/Profile.tsx"; const router = createBrowserRouter([ {path: "/", element: }, - {path: "/dashboard", element: */}, - {path: "/profile", element: */}, + {path: "/dashboard", element: }, + {path: "/profile", element: }, {path: "*", element: }, ]);