|
@@ -13,6 +13,7 @@ import {
|
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
|
import dayjs from 'dayjs';
|
|
import dayjs from 'dayjs';
|
|
|
import 'dayjs/locale/zh-cn';
|
|
import 'dayjs/locale/zh-cn';
|
|
|
|
|
+import { ToastContainer } from "react-toastify";
|
|
|
import { AuthProvider, ThemeProvider, useAuth } from './hooks.tsx';
|
|
import { AuthProvider, ThemeProvider, useAuth } from './hooks.tsx';
|
|
|
import HomePage from './pages_index.tsx';
|
|
import HomePage from './pages_index.tsx';
|
|
|
import LoginPage from './pages_login.tsx';
|
|
import LoginPage from './pages_login.tsx';
|
|
@@ -27,6 +28,9 @@ import { ClassroomPage } from './pages_classroom.tsx';
|
|
|
import ExamIndex from './components/Exam/ExamIndex.tsx';
|
|
import ExamIndex from './components/Exam/ExamIndex.tsx';
|
|
|
import ExamAdmin from './components/Exam/ExamAdmin.tsx';
|
|
import ExamAdmin from './components/Exam/ExamAdmin.tsx';
|
|
|
import ExamCard from './components/Exam/ExamCard.tsx';
|
|
import ExamCard from './components/Exam/ExamCard.tsx';
|
|
|
|
|
+import ProfilePage from './pages_profile.tsx'
|
|
|
|
|
+import SettingsPage from './pages_settings.tsx'
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 设置中文语言
|
|
// 设置中文语言
|
|
|
dayjs.locale('zh-cn');
|
|
dayjs.locale('zh-cn');
|
|
@@ -200,9 +204,6 @@ const ErrorPage = () => {
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-import ProfilePage from './pages_profile.tsx'
|
|
|
|
|
-import SettingsPage from './pages_settings.tsx'
|
|
|
|
|
-
|
|
|
|
|
// 移动端布局组件 - 包含底部导航
|
|
// 移动端布局组件 - 包含底部导航
|
|
|
const MobileLayout = () => {
|
|
const MobileLayout = () => {
|
|
|
const location = useLocation();
|
|
const location = useLocation();
|
|
@@ -379,6 +380,17 @@ const initApp = () => {
|
|
|
<ThemeProvider>
|
|
<ThemeProvider>
|
|
|
<AuthProvider>
|
|
<AuthProvider>
|
|
|
<App />
|
|
<App />
|
|
|
|
|
+ <ToastContainer
|
|
|
|
|
+ position="top-right"
|
|
|
|
|
+ autoClose={500}
|
|
|
|
|
+ hideProgressBar={false}
|
|
|
|
|
+ newestOnTop={false}
|
|
|
|
|
+ closeOnClick
|
|
|
|
|
+ rtl={false}
|
|
|
|
|
+ pauseOnFocusLoss
|
|
|
|
|
+ draggable
|
|
|
|
|
+ pauseOnHover
|
|
|
|
|
+ />
|
|
|
</AuthProvider>
|
|
</AuthProvider>
|
|
|
</ThemeProvider>
|
|
</ThemeProvider>
|
|
|
</QueryClientProvider>
|
|
</QueryClientProvider>
|