This commit is contained in:
Nguyễn Hải Dũng 2022-12-16 16:27:04 +07:00
parent fa61fafd7c
commit f7e17b66f4
2 changed files with 2 additions and 9 deletions

View File

@ -16,6 +16,7 @@ import { Provider } from 'react-redux';
import store from './store'; import store from './store';
import ReactRouter from './router/ReactRouter'; import ReactRouter from './router/ReactRouter';
import { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom'; import { BrowserRouter as Router, Link, Route, Switch } from 'react-router-dom';
import AutoLogin from 'components/AutoLogin/AutoLogin';
@ -26,6 +27,7 @@ function App() {
<Switch> <Switch>
{/* <Route path={"/login"} exact render={() => <Login />} /> */} {/* <Route path={"/login"} exact render={() => <Login />} /> */}
<Route path={"/login"} exact render={() => <Login />} /> <Route path={"/login"} exact render={() => <Login />} />
<Route path={'/auth/:token?'} render={(props) => <AutoLogin {...props} />} />
<ReactRouter /> <ReactRouter />
</Switch> </Switch>
</Router> </Router>

View File

@ -47,15 +47,6 @@ class ReactRouter extends Component {
: :
'' ''
} }
{
this.state.dataRole?.indexOf('search:view') !== -1
?
<>
<Route path={'/auth/:token?'} render={(props) => <AutoLogin {...props} />} />
</>
:
''
}
{ {
this.state.dataRole?.indexOf('search:view') !== -1 this.state.dataRole?.indexOf('search:view') !== -1