parent
8fbcefcf10
commit
f0d2370d5c
@ -1,3 +1,4 @@ |
||||
export const PAGES = { |
||||
login: '/login', |
||||
register: '/register', |
||||
} |
||||
|
||||
@ -1,12 +1,33 @@ |
||||
import React from 'react' |
||||
import { |
||||
Router, |
||||
Route, |
||||
Redirect, |
||||
} from 'react-router-dom' |
||||
import { createBrowserHistory } from 'history' |
||||
|
||||
import { GlobalStyles } from 'features/GlobalStyles' |
||||
import { Theme } from 'features/Theme' |
||||
import { Login } from 'features/Login' |
||||
import { GlobalStyles } from 'features/GlobalStyles' |
||||
import { Register } from 'features/Register' |
||||
import { PAGES } from 'config' |
||||
|
||||
const history = createBrowserHistory() |
||||
|
||||
export const App = () => ( |
||||
<Theme> |
||||
<GlobalStyles /> |
||||
<Login /> |
||||
</Theme> |
||||
<Router history={history}> |
||||
<Theme> |
||||
<GlobalStyles /> |
||||
|
||||
<Route path={PAGES.login}> |
||||
<Login /> |
||||
</Route> |
||||
|
||||
<Route path={PAGES.register}> |
||||
<Register /> |
||||
</Route> |
||||
|
||||
<Redirect to={PAGES.login} /> |
||||
</Theme> |
||||
</Router> |
||||
) |
||||
|
||||
@ -0,0 +1,3 @@ |
||||
import React from 'react' |
||||
|
||||
export const Register = () => <div>Registration page</div> |
||||
Loading…
Reference in new issue