From ef309f1022352fc127b27128aebab377cefb5a22 Mon Sep 17 00:00:00 2001 From: Kristian Gjertsen Date: Sat, 14 Nov 2026 17:53:04 +0100 Subject: [PATCH 1/5] add 404 Not Found page with navigation back to home --- frontend/src/App.tsx | 6 ++---- frontend/src/pages/notFoundPage/notFoundPage.tsx | 13 +++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 frontend/src/pages/notFoundPage/notFoundPage.tsx diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 016b702..09cba57 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -6,6 +6,7 @@ import CommunityPage from "./pages/communityPage/communityPage"; import Layout from "./components/Layout"; import LoginPage from "./pages/loginPage/loginPage"; import AccountPage from "./pages/accountPage/accountPage"; +import NotFoundPage from "./pages/notFoundPage/notFoundPage"; import { Routes, Route, useLocation, useParams } from "react-router"; import { useSelector } from "react-redux"; import type { RootState } from "./state/store"; @@ -34,10 +35,7 @@ function App() { } /> } /> } /> - 404 - Page not found

} - /> + } /> ); diff --git a/frontend/src/pages/notFoundPage/notFoundPage.tsx b/frontend/src/pages/notFoundPage/notFoundPage.tsx new file mode 100644 index 0000000..eb17008 --- /dev/null +++ b/frontend/src/pages/notFoundPage/notFoundPage.tsx @@ -0,0 +1,13 @@ +import Button from "@/components/buttons/Button"; + +export default function NotFoundPage() { + return ( +
+

404

+

Page not found.

+ +
+ ); +} From 266e934743b386416596213661d5ce8519380fbd Mon Sep 17 00:00:00 2001 From: Kristian Gjertsen Date: Sat, 14 Nov 2026 18:08:42 +0100 Subject: [PATCH 2/5] refactor: enhance UI consistency by applying 'tabular-nums' class to price elements and improving layout responsiveness --- frontend/src/components/DesktopComponentDetailPage.tsx | 2 +- frontend/src/components/MobileComponentDetailPage.tsx | 2 +- frontend/src/components/PcPartCardLayout.tsx | 8 ++++---- frontend/src/pages/accountPage/accountPage.tsx | 2 +- .../pcBuilderPage/components/BuildSummaryComponent.tsx | 2 +- .../components/ComponentSelectionComponent.tsx | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/frontend/src/components/DesktopComponentDetailPage.tsx b/frontend/src/components/DesktopComponentDetailPage.tsx index bcb43a1..25a2f5b 100644 --- a/frontend/src/components/DesktopComponentDetailPage.tsx +++ b/frontend/src/components/DesktopComponentDetailPage.tsx @@ -123,7 +123,7 @@ export default function DesktopComponentDetailPage({ part }: { part: PcPart }) {
-

+

{part.price_eur === null ? "Price unavailable" : `€${part.price_eur.toFixed(2)}`} diff --git a/frontend/src/components/MobileComponentDetailPage.tsx b/frontend/src/components/MobileComponentDetailPage.tsx index 6f52f3c..99391c2 100644 --- a/frontend/src/components/MobileComponentDetailPage.tsx +++ b/frontend/src/components/MobileComponentDetailPage.tsx @@ -66,7 +66,7 @@ export default function ComponentDetailPage({ part }: { part: PcPart }) { {part.name} -

+

{part.price_eur === null ? "Price unavailable" : `€${part.price_eur.toFixed(2)}`} diff --git a/frontend/src/components/PcPartCardLayout.tsx b/frontend/src/components/PcPartCardLayout.tsx index 6e4d42c..66403df 100644 --- a/frontend/src/components/PcPartCardLayout.tsx +++ b/frontend/src/components/PcPartCardLayout.tsx @@ -32,7 +32,7 @@ export default function PcPartCardLayout({ }} >

{ if (skeleton || event.target !== event.currentTarget) return; if (event.key === "Enter" || event.key === " "){ @@ -49,10 +49,10 @@ export default function PcPartCardLayout({
@@ -71,7 +71,7 @@ export default function PcPartCardLayout({ {error}
-

+

{price}

diff --git a/frontend/src/pages/accountPage/accountPage.tsx b/frontend/src/pages/accountPage/accountPage.tsx index cfb1111..8293fe6 100644 --- a/frontend/src/pages/accountPage/accountPage.tsx +++ b/frontend/src/pages/accountPage/accountPage.tsx @@ -214,7 +214,7 @@ function AccountContent() { {builds.slice(0, 20).map((build) => (
Build total:

-

+

€{totalSum.toFixed(2)}

{missingPriceCount > 0 && ( diff --git a/frontend/src/pages/pcBuilderPage/components/ComponentSelectionComponent.tsx b/frontend/src/pages/pcBuilderPage/components/ComponentSelectionComponent.tsx index b32a2c1..1ae96f4 100644 --- a/frontend/src/pages/pcBuilderPage/components/ComponentSelectionComponent.tsx +++ b/frontend/src/pages/pcBuilderPage/components/ComponentSelectionComponent.tsx @@ -86,10 +86,10 @@ export default function ComponentSelectionComponent({
-

+

{part.price_eur == null ? "Price unavailable" - : `€${part.price_eur}`} + : `€${part.price_eur.toFixed(2)}`}

- )} + {!loading && + (!featured || error) && + (!error && !pageInfo?.hasNextPage ? ( +

+ Showing {visibleParts.length}/{totalCount} +

+ ) : ( + + ))} ); } diff --git a/frontend/src/components/buttons/Button.tsx b/frontend/src/components/buttons/Button.tsx index 1108ceb..b2df5a7 100644 --- a/frontend/src/components/buttons/Button.tsx +++ b/frontend/src/components/buttons/Button.tsx @@ -4,7 +4,7 @@ import { twMerge } from "tailwind-merge"; const variantStyles = { text: "w-auto rounded border-0 bg-transparent p-0 font-normal text-accent underline decoration-1 underline-offset-4 transition-colors enabled:hover:text-white", - danger: "border-red-600 bg-red-600 text-white hover:border-red-300", + danger: "border-status-incompatible bg-status-incompatible text-white hover:border-red-300", default: "border-orange-400 bg-orange-400 text-black hover:border-black", dark: "border-black bg-black text-orange-400 hover:border-orange-400", secondary: diff --git a/frontend/src/pages/pcBuilderPage/components/CompatabilityComponent.tsx b/frontend/src/pages/pcBuilderPage/components/CompatabilityComponent.tsx index 5ef5fba..01d2f31 100644 --- a/frontend/src/pages/pcBuilderPage/components/CompatabilityComponent.tsx +++ b/frontend/src/pages/pcBuilderPage/components/CompatabilityComponent.tsx @@ -101,10 +101,10 @@ export default function CompatabilityComponent({ parts }: { parts: PcPart[] }) { return (
-

+