返回 AiToEarn
App.tsx
1 /*
2 * @Author: nevin
3 * @Date: 2025-01-17 19:25:29
4 * @LastEditTime: 2025-03-23 15:00:16
5 * @LastEditors: nevin
6 * @Description: 主应用
7 */
8
9 import { RouterProvider } from 'react-router-dom';
10 import router from '@/router/index';
11 import { ConfigProvider, notification } from 'antd';
12 import Inform from './components/Inform';
13 import { useEffect } from 'react';
14 import { useCommontStore } from './store/commont';
15
16 const App = () => {
17 const [api, contextHolder] = notification.useNotification({
18 top: 74,
19 });
20
21 useEffect(() => {
22 useCommontStore.getState().setNotification(api);
23 }, []);
24
25 return (
26 <ConfigProvider
27 theme={{
28 token: {
29 colorPrimary: '#a66ae4',
30 },
31 }}
32 >
33 {contextHolder}
34 <Inform onChooseItem={() => {}} />
35 <RouterProvider router={router} />
36 </ConfigProvider>
37 );
38 };
39
40 export default App;
41
41 lines Plain Text