From 458a6e7c45bd88bbea22da4ec969cdfd2fdef84d Mon Sep 17 00:00:00 2001 From: johndoe6345789 Date: Sat, 17 Jan 2026 13:02:39 +0000 Subject: [PATCH] Generated by Spark: Add custom 404 page design with helpful navigation links --- src/components/NotFoundPage.tsx | 115 ++++++++++++++++++++ src/components/organisms/ToolbarActions.tsx | 1 + src/router/routes.tsx | 3 +- 3 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 src/components/NotFoundPage.tsx diff --git a/src/components/NotFoundPage.tsx b/src/components/NotFoundPage.tsx new file mode 100644 index 0000000..2f2ff50 --- /dev/null +++ b/src/components/NotFoundPage.tsx @@ -0,0 +1,115 @@ +import { useNavigate } from 'react-router-dom' +import { Button } from '@/components/ui/button' +import { Card } from '@/components/ui/card' +import { + House, + ArrowLeft, + MagnifyingGlass, + Compass, + Code, + Cube, + Lightning, + ChartBar +} from '@phosphor-icons/react' + +export function NotFoundPage() { + const navigate = useNavigate() + + const quickLinks = [ + { label: 'Dashboard', icon: ChartBar, path: '/dashboard', description: 'Project overview and stats' }, + { label: 'Code Editor', icon: Code, path: '/code', description: 'Edit your source files' }, + { label: 'Components', icon: Lightning, path: '/components', description: 'UI component library' }, + { label: 'Models', icon: Cube, path: '/models', description: 'Data models and schemas' }, + ] + + return ( +
+
+
+
+ +
+ +

404

+

Page Not Found

+

+ The page you're looking for doesn't exist or may have been moved. +

+
+ +
+ + + + + +
+ +
+

+ Quick Links +

+
+ {quickLinks.map((link) => { + const Icon = link.icon + return ( + navigate(link.path)} + > +
+
+ +
+
+

{link.label}

+

+ {link.description} +

+
+
+
+ ) + })} +
+
+ +
+

+ Need help? Check the keyboard shortcuts with{' '} + Ctrl + {' + '} + / +

+
+
+
+ ) +} diff --git a/src/components/organisms/ToolbarActions.tsx b/src/components/organisms/ToolbarActions.tsx index c306a70..0c9cbd6 100644 --- a/src/components/organisms/ToolbarActions.tsx +++ b/src/components/organisms/ToolbarActions.tsx @@ -36,6 +36,7 @@ export function ToolbarActions({ icon={} label="Search (Ctrl+K)" onClick={onSearch} + data-search-trigger /> {showErrorButton && errorCount > 0 && onShowErrors && ( diff --git a/src/router/routes.tsx b/src/router/routes.tsx index f0e4935..2431aa3 100644 --- a/src/router/routes.tsx +++ b/src/router/routes.tsx @@ -1,6 +1,7 @@ import { lazy, Suspense } from 'react' import { RouteObject, Navigate } from 'react-router-dom' import { LoadingFallback } from '@/components/molecules' +import { NotFoundPage } from '@/components/NotFoundPage' import { getEnabledPages, resolveProps } from '@/config/page-loader' import { ComponentRegistry } from '@/lib/component-registry' import { FeatureToggles } from '@/types/project' @@ -140,7 +141,7 @@ export function createRoutes( routes.push({ path: '*', - element: + element: }) console.log('[ROUTES] ✅ Routes created:', routes.length, 'routes')