mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-01-11 11:34:26 +00:00
Remove authCheck dead code.
This commit is contained in:
parent
5f11991b7f
commit
fa18b408cd
@ -10,24 +10,13 @@ export default class Root extends Component {
|
|||||||
routes: PropTypes.func
|
routes: PropTypes.func
|
||||||
};
|
};
|
||||||
|
|
||||||
authCheck(nextState, replace, callback) {
|
|
||||||
let {store} = this.props
|
|
||||||
let {loggedIn} = store.getState().auth
|
|
||||||
let authPath = '/auth'
|
|
||||||
if (!loggedIn) {
|
|
||||||
replace(authPath)
|
|
||||||
}
|
|
||||||
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {store, history, routes} = this.props;
|
const {store, history, routes} = this.props;
|
||||||
// key={Math.random()} = hack for HMR from https://github.com/webpack/webpack-dev-server/issues/395
|
// key={Math.random()} = hack for HMR from https://github.com/webpack/webpack-dev-server/issues/395
|
||||||
return (
|
return (
|
||||||
<Provider store={store} key={Math.random()}>
|
<Provider store={store} key={Math.random()}>
|
||||||
<Router history={history} key={Math.random()}>
|
<Router history={history} key={Math.random()}>
|
||||||
{routes(::this.authCheck)}
|
{routes()}
|
||||||
</Router>
|
</Router>
|
||||||
</Provider>
|
</Provider>
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user