forked from ddrilling/asb_cloud_front
27 lines
615 B
JavaScript
27 lines
615 B
JavaScript
import './styles/App.less'
|
|
import {
|
|
BrowserRouter as Router,
|
|
Switch,
|
|
Route} from "react-router-dom"
|
|
import Login from './pages/Login'
|
|
import Main from './pages/Main'
|
|
import { OpenAPI } from './services/api'
|
|
import { PrivateRoute } from './components/PrivateRoute'
|
|
|
|
//OpenAPI.BASE = 'http://localhost:3000'
|
|
OpenAPI.TOKEN = localStorage['token']
|
|
|
|
export default function App() {
|
|
return (
|
|
<Router>
|
|
<Switch>
|
|
<Route path="/login">
|
|
<Login />
|
|
</Route>
|
|
<PrivateRoute path="/">
|
|
<Main />
|
|
</PrivateRoute>
|
|
</Switch>
|
|
</Router>
|
|
)
|
|
} |