refactor(structure):去掉路由控制。
This commit is contained in:
		| @@ -3,8 +3,7 @@ import { useColorScheme } from '@mantine/hooks'; | ||||
| import { Notifications } from '@mantine/notifications'; | ||||
| import React, { FC, useState } from 'react'; | ||||
| import ReactDOM from 'react-dom/client'; | ||||
| import { RouterProvider } from 'react-router-dom'; | ||||
| import { appRouter } from './router'; | ||||
| import { MainLayout } from './MainLayout'; | ||||
| import { useAppTheme } from './theme'; | ||||
|  | ||||
| const AppMain: FC = () => { | ||||
| @@ -17,7 +16,7 @@ const AppMain: FC = () => { | ||||
|       <ColorSchemeProvider colorScheme={colorScheme} toggleColorScheme={setColorScheme}> | ||||
|         <MantineProvider theme={theme} withGlobalStyles withNormalizeCSS> | ||||
|           <Notifications position="bottom-right" limit={5} zIndex={999} /> | ||||
|           <RouterProvider router={appRouter} /> | ||||
|           <MainLayout /> | ||||
|         </MantineProvider> | ||||
|       </ColorSchemeProvider> | ||||
|     </React.StrictMode> | ||||
|   | ||||
| @@ -1,9 +0,0 @@ | ||||
| import { createBrowserRouter } from "react-router-dom"; | ||||
| import { MainLayout } from "./MainLayout"; | ||||
|  | ||||
| export const appRouter = createBrowserRouter([ | ||||
|   { | ||||
|     path: "/", | ||||
|     element: <MainLayout />, | ||||
|   }, | ||||
| ]); | ||||
		Reference in New Issue
	
	Block a user