Redirect / to /login
This commit is contained in:
parent
88ee030db9
commit
b06c0e8a1d
|
@ -3,7 +3,8 @@ import "./App.css";
|
||||||
import {
|
import {
|
||||||
BrowserRouter as Router,
|
BrowserRouter as Router,
|
||||||
Switch,
|
Switch,
|
||||||
Route
|
Route,
|
||||||
|
Redirect
|
||||||
} from "react-router-dom";
|
} from "react-router-dom";
|
||||||
|
|
||||||
import Home from "./pages/Home";
|
import Home from "./pages/Home";
|
||||||
|
@ -14,7 +15,7 @@ function App() {
|
||||||
<Router>
|
<Router>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path="/">
|
<Route exact path="/">
|
||||||
<div>Main Page</div>
|
<Redirect to="/login" />
|
||||||
</Route>
|
</Route>
|
||||||
<Route path="/login">
|
<Route path="/login">
|
||||||
<Login />
|
<Login />
|
||||||
|
|
Loading…
Reference in New Issue