增加Scheme无法找到的警告页面。
This commit is contained in:
		@@ -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 /> },
 | 
			
		||||
        ],
 | 
			
		||||
      },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										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>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user