Base du projet 'application ticketing'
This commit is contained in:
@ -1,12 +1,8 @@
|
||||
|
||||
import { Component, Fragment } from 'react'
|
||||
import { hot } from 'react-hot-loader'
|
||||
import { HashRouter } from 'react-router-dom' // ou BrowserRouter
|
||||
import { Route, Switch, Redirect } from 'react-router'
|
||||
import LoginPage from './pages/login';
|
||||
import ChatPage from './pages/chat';
|
||||
|
||||
require('bulma/css/bulma.min.css')
|
||||
import HomePage from './pages/home';
|
||||
|
||||
class App extends Component {
|
||||
render () {
|
||||
@ -14,10 +10,8 @@ class App extends Component {
|
||||
<Fragment>
|
||||
<HashRouter>
|
||||
<Switch>
|
||||
<Route path='/login' exact component={LoginPage} />
|
||||
<Route path='/chat/:channel' component={ChatPage} />
|
||||
<Route path='/chat' component={ChatPage} />
|
||||
<Route component={() => <Redirect to="/login" />} />
|
||||
<Route path='/home' exact component={HomePage} />
|
||||
<Route component={() => <Redirect to="/home" />} />
|
||||
</Switch>
|
||||
</HashRouter>
|
||||
</Fragment>
|
||||
|
Reference in New Issue
Block a user