Skip to content

Commit 7fb2210

Browse files
committed
update page links and content
1 parent 78d415a commit 7fb2210

File tree

5 files changed

+67
-24
lines changed

5 files changed

+67
-24
lines changed

src/App.tsx

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,13 @@ import "./assets/fonts/fontin/Fontin-Italic.ttf";
44
import "./assets/fonts/fontin/Fontin-Regular.ttf";
55
import "./assets/fonts/fontin/Fontin-SmallCaps.ttf";
66

7-
import { BrowserRouter, Route, Routes } from "react-router";
8-
9-
import { MainLayout } from "./routes/layout/MainLayout";
10-
import { CalculationView as HomePage } from "./components/CalculationView";
7+
import { BrowserRouter } from "react-router";
8+
import { Routes } from "./routes/Routes";
119

1210
function App() {
1311
return (
1412
<BrowserRouter>
15-
<Routes>
16-
<Route element={<MainLayout />}>
17-
<Route index element={<HomePage />} />
18-
<Route path='*' element={<div>404</div>} />
19-
</Route>
20-
</Routes>
13+
<Routes />
2114
</BrowserRouter>
2215
);
2316
}

src/routes/Routes.tsx

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import { Route, Routes as RouterRotues } from "react-router";
2+
3+
import { MainLayout } from "./layout/MainLayout";
4+
import { CalculationView as HomePage } from "@/components/CalculationView";
5+
export function Routes() {
6+
return (
7+
<RouterRotues>
8+
<Route element={<MainLayout />}>
9+
<Route index element={<HomePage />} />
10+
<Route
11+
path='/graphs'
12+
element={
13+
<div>
14+
<p>This page is not yet available.</p> <p>There will be graphs about rate trends.</p>
15+
</div>
16+
}
17+
/>
18+
<Route
19+
path='/settings'
20+
element={
21+
<div>
22+
<p>This page is not yet available.</p>{" "}
23+
<p>You will be able to fine-tune your experience on Exalt Rates.</p>
24+
</div>
25+
}
26+
/>
27+
<Route
28+
path='/faq'
29+
element={
30+
<div>
31+
<p>This page is not yet available.</p>
32+
</div>
33+
}
34+
/>
35+
<Route
36+
path='*'
37+
element={
38+
<div>
39+
<h1>404</h1>
40+
<p>Page not found</p>
41+
</div>
42+
}
43+
/>
44+
</Route>
45+
</RouterRotues>
46+
);
47+
}

src/routes/layout/Header/PinnedConversion.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { PinOff } from "lucide-react";
22
import clsx from "clsx";
33

4-
import { getCache } from "../../../utils/storage";
5-
import { convert } from "../../../utils/convert";
6-
import { useStorage } from "../../../hooks/useStorage";
4+
import { getCache } from "@/utils/storage";
5+
import { convert } from "@/utils/convert";
6+
import { useStorage } from "@/hooks/useStorage";
77

8-
import { CurrencyIcon } from "../../../components/CurrencyIcon";
8+
import { CurrencyIcon } from "@/components/CurrencyIcon";
99

1010
export function PinnedConversion() {
1111
const {
@@ -21,7 +21,7 @@ export function PinnedConversion() {
2121
const conversionRate = convert(pinned.primary, pinned.secondary, currencyMap).rate;
2222

2323
return (
24-
<div className='flex select-none items-center text-primary-main text-sm self-center'>
24+
<div className='flex gap-1 select-none items-center text-primary-main text-md self-center sm:text-lg'>
2525
<div className='flex flex-row items-center'>
2626
<span></span>
2727
<CurrencyIcon size={30} name={pinned.primary} />

src/routes/layout/links/Link.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
import { cn } from "@/components/shadcn/lib/utils";
21
import { Link as RouterLink } from "react-router";
32

3+
import { cn } from "@/components/shadcn/lib/utils";
4+
45
export const Link = ({ Icon, to, text, selected }: { Icon?: any; to: string; text: string; selected?: boolean }) => (
56
<RouterLink
67
to={to}
78
className={cn(
8-
"inline-flex gap-1 font-[FontinBold] transition-colors hover:text-primary-lighter hover:underline",
9+
"inline-flex gap-2 font-[FontinBold] w-max transition-colors hover:text-primary-lighter hover:underline",
910
selected ? "underline" : undefined
1011
)}>
11-
{!Icon && <Icon />} {text}
12+
{Icon && <Icon />} {text}
1213
</RouterLink>
1314
);
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
import { ChartColumnDecreasing, CircleHelp, House, Settings } from "lucide-react";
1+
import { Construction } from "lucide-react";
22
import { Link } from "./Link";
33

44
export const PageLinks = () => (
5-
<div className='flex flex-col gap-1 text-lg'>
6-
<Link to='/' text='Home' Icon={House} />
7-
<Link to='/graphs' text='Graphs' Icon={ChartColumnDecreasing} />
8-
<Link to='/settings' text='Settings' Icon={Settings} />
9-
<Link to='/faq' text='F.A.Q.' Icon={CircleHelp} />
5+
<div className='flex flex-col gap-4 text-2xl w-max'>
6+
<Link to='/' text='Home' />
7+
<div className='flex flex-col gap-1 text-primary-darker'>
8+
<Link to='/graphs' text='Graphs' Icon={Construction} />
9+
<Link to='/settings' text='Settings' Icon={Construction} />
10+
<Link to='/faq' text='F.A.Q.' Icon={Construction} />
11+
</div>
1012
</div>
1113
);

0 commit comments

Comments
 (0)