feat: 前端集成 Prettier 代码格式化
This commit is contained in:
@@ -1,25 +1,25 @@
|
||||
import { lazy, Suspense } from 'react';
|
||||
import { Routes, Route, Navigate } from 'react-router';
|
||||
import { Loading } from 'tdesign-react';
|
||||
import { AppLayout } from '@/components/AppLayout';
|
||||
import { lazy, Suspense } from 'react'
|
||||
import { Routes, Route, Navigate } from 'react-router'
|
||||
import { Loading } from 'tdesign-react'
|
||||
import { AppLayout } from '@/components/AppLayout'
|
||||
|
||||
const ProvidersPage = lazy(() => import('@/pages/Providers'));
|
||||
const StatsPage = lazy(() => import('@/pages/Stats'));
|
||||
const SettingsPage = lazy(() => import('@/pages/Settings'));
|
||||
const NotFound = lazy(() => import('@/pages/NotFound'));
|
||||
const ProvidersPage = lazy(() => import('@/pages/Providers'))
|
||||
const StatsPage = lazy(() => import('@/pages/Stats'))
|
||||
const SettingsPage = lazy(() => import('@/pages/Settings'))
|
||||
const NotFound = lazy(() => import('@/pages/NotFound'))
|
||||
|
||||
export function AppRoutes() {
|
||||
return (
|
||||
<Suspense fallback={<Loading />}>
|
||||
<Routes>
|
||||
<Route element={<AppLayout />}>
|
||||
<Route index element={<Navigate to="/providers" replace />} />
|
||||
<Route path="providers" element={<ProvidersPage />} />
|
||||
<Route path="stats" element={<StatsPage />} />
|
||||
<Route path="settings" element={<SettingsPage />} />
|
||||
<Route path="*" element={<NotFound />} />
|
||||
<Route index element={<Navigate to='/providers' replace />} />
|
||||
<Route path='providers' element={<ProvidersPage />} />
|
||||
<Route path='stats' element={<StatsPage />} />
|
||||
<Route path='settings' element={<SettingsPage />} />
|
||||
<Route path='*' element={<NotFound />} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</Suspense>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user