feat: 增加默认跳转

This commit is contained in:
秋水浮尘
2023-10-15 00:12:03 +08:00
parent a387a61d02
commit 7ba8d52bfe
7 changed files with 97 additions and 81 deletions

31
src/router/index.tsx Normal file
View File

@@ -0,0 +1,31 @@
import App from '@/App'
import QuestionBank from '@views/question-bank';
import UploadQuestions from '@views/upload-questions';
import BrushQuestions from '@views/brush-questions'
import {
createBrowserRouter,
} from "react-router-dom";
const router = createBrowserRouter([
{
path: "/",
element: <App />,
children: [
{
path: "question-bank",
element: <QuestionBank />,
},
{
path: "brush-question",
element: <BrushQuestions />,
},
{
path: "upload-question",
element: <UploadQuestions />,
},
],
},
]);
export default router