import { BrowserRouter as Router, Navigate, Route, Routes } from 'react-router-dom' import { lazy, memo, Suspense } from 'react' import locale from 'antd/lib/locale/ru_RU' import { ConfigProvider } from 'antd' import { RootPathContext } from '@asb/context' import { UserOutlet } from '@components/outlets' import SuspenseFallback from '@components/SuspenseFallback' import { getUserToken, NoAccessComponent } from '@utils' import { OpenAPI } from '@api' import '@styles/include/antd_theme.less' import '@styles/App.less' const Login = lazy(() => import('@pages/public/Login')) const Register = lazy(() => import('@pages/public/Register')) const FileDownload = lazy(() => import('@pages/FileDownload')) const AdminPanel = lazy(() => import('@pages/AdminPanel')) const Deposit = lazy(() => import('@pages/Deposit')) const Cluster = lazy(() => import('@pages/Cluster')) const Well = lazy(() => import('@asb/pages/Well')) //OpenAPI.BASE = 'http://localhost:3000' OpenAPI.TOKEN = async () => getUserToken() ?? '' OpenAPI.HEADERS = { 'Content-Type': 'application/json' } export const App = memo(() => ( }> } /> } /> {/* Public pages */} } /> } /> {/* User pages */} }> {/* Admin pages */} } /> {/* Client pages */} } /> } /> } /> } /> )) export default App