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 { 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 />