Add support for flash messages utilizing redux
This commit is contained in:
parent
b93b40ba31
commit
435626f4b7
15 changed files with 268 additions and 34 deletions
|
@ -2,16 +2,29 @@ import * as React from 'react';
|
|||
import { hot } from 'react-hot-loader/root';
|
||||
import { BrowserRouter as Router, Route } from 'react-router-dom';
|
||||
import AuthenticationRouter from '@/routers/AuthenticationRouter';
|
||||
import { Provider } from 'react-redux';
|
||||
import { persistor, store } from '@/redux/configure';
|
||||
import { PersistGate } from 'redux-persist/integration/react';
|
||||
|
||||
class App extends React.PureComponent {
|
||||
render () {
|
||||
return (
|
||||
<Router>
|
||||
<div>
|
||||
<Route exact path="/"/>
|
||||
<Route path="/auth" component={AuthenticationRouter}/>
|
||||
</div>
|
||||
</Router>
|
||||
<Provider store={store}>
|
||||
<PersistGate persistor={persistor} loading={this.renderLoading()}>
|
||||
<Router>
|
||||
<div>
|
||||
<Route exact path="/"/>
|
||||
<Route path="/auth" component={AuthenticationRouter}/>
|
||||
</div>
|
||||
</Router>
|
||||
</PersistGate>
|
||||
</Provider>
|
||||
);
|
||||
}
|
||||
|
||||
renderLoading () {
|
||||
return (
|
||||
<div className={'spinner spinner-lg'}></div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue