Redirect / to /login

This commit is contained in:
Ceda EI 2021-04-09 19:19:03 +05:30
parent 88ee030db9
commit b06c0e8a1d
1 changed files with 3 additions and 2 deletions

View File

@ -3,7 +3,8 @@ import "./App.css";
import {
BrowserRouter as Router,
Switch,
Route
Route,
Redirect
} from "react-router-dom";
import Home from "./pages/Home";
@ -14,7 +15,7 @@ function App() {
<Router>
<Switch>
<Route exact path="/">
<div>Main Page</div>
<Redirect to="/login" />
</Route>
<Route path="/login">
<Login />