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