增加Scheme无法找到的警告页面。

This commit is contained in:
徐涛 2024-12-25 17:22:34 +08:00
parent 6b40a4e374
commit c5f0bb32aa
3 changed files with 19 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import { Home } from './pages/Home';
import { MainLayout } from './pages/MainLayout';
import { NewScheme } from './pages/NewScheme';
import { SchemeDetail } from './pages/SchemeDetail';
import { SchemeNotFound } from './pages/SchemeNotFound';
import { Schemes } from './pages/Schemes';
const routes = createBrowserRouter([
@ -17,6 +18,7 @@ const routes = createBrowserRouter([
element: <Schemes />,
children: [
{ path: 'new', element: <NewScheme /> },
{ path: 'not-found', element: <SchemeNotFound /> },
{ path: ':id', element: <SchemeDetail /> },
],
},

View File

@ -0,0 +1,6 @@
@layer pages {
.unexists {
font-size: var(--font-size-xl);
color: var(--color-danger);
}
}

View File

@ -0,0 +1,11 @@
import styles from './SchemeNotFound.module.css';
export function SchemeNotFound() {
return (
<div className="center">
<div className={styles.unexists}>
Request scheme is <strong>NOT</strong> exists.
</div>
</div>
);
}