增加Scheme无法找到的警告页面。
This commit is contained in:
parent
6b40a4e374
commit
c5f0bb32aa
|
@ -4,6 +4,7 @@ import { Home } from './pages/Home';
|
||||||
import { MainLayout } from './pages/MainLayout';
|
import { MainLayout } from './pages/MainLayout';
|
||||||
import { NewScheme } from './pages/NewScheme';
|
import { NewScheme } from './pages/NewScheme';
|
||||||
import { SchemeDetail } from './pages/SchemeDetail';
|
import { SchemeDetail } from './pages/SchemeDetail';
|
||||||
|
import { SchemeNotFound } from './pages/SchemeNotFound';
|
||||||
import { Schemes } from './pages/Schemes';
|
import { Schemes } from './pages/Schemes';
|
||||||
|
|
||||||
const routes = createBrowserRouter([
|
const routes = createBrowserRouter([
|
||||||
|
@ -17,6 +18,7 @@ const routes = createBrowserRouter([
|
||||||
element: <Schemes />,
|
element: <Schemes />,
|
||||||
children: [
|
children: [
|
||||||
{ path: 'new', element: <NewScheme /> },
|
{ path: 'new', element: <NewScheme /> },
|
||||||
|
{ path: 'not-found', element: <SchemeNotFound /> },
|
||||||
{ path: ':id', element: <SchemeDetail /> },
|
{ path: ':id', element: <SchemeDetail /> },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
6
src/pages/SchemeNotFound.module.css
Normal file
6
src/pages/SchemeNotFound.module.css
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
@layer pages {
|
||||||
|
.unexists {
|
||||||
|
font-size: var(--font-size-xl);
|
||||||
|
color: var(--color-danger);
|
||||||
|
}
|
||||||
|
}
|
11
src/pages/SchemeNotFound.tsx
Normal file
11
src/pages/SchemeNotFound.tsx
Normal 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>
|
||||||
|
);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user