redirect / to library

This commit is contained in:
Aria Moradi 2021-02-20 02:41:30 +03:30
parent 2bbebe4c30
commit 9a282c3bf4
2 changed files with 8 additions and 18 deletions

View File

@ -4,14 +4,13 @@
import React, { useState } from 'react';
import {
BrowserRouter as Router, Route, Switch,
BrowserRouter as Router, Redirect, Route, Switch,
} from 'react-router-dom';
import { Container } from '@material-ui/core';
import CssBaseline from '@material-ui/core/CssBaseline';
import { createMuiTheme, ThemeProvider } from '@material-ui/core/styles';
import NavBar from './components/NavBar';
import Home from './screens/Home';
import Sources from './screens/Sources';
import Extensions from './screens/Extensions';
import SourceMangas from './screens/SourceMangas';
@ -94,9 +93,13 @@ export default function App() {
<Route path="/settings">
<Settings />
</Route>
<Route path="/">
<Home />
</Route>
<Route
exact
path="/"
render={() => (
<Redirect to="/library" />
)}
/>
</Switch>
</Container>
</NavBarTitle.Provider>

View File

@ -1,13 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
import React from 'react';
export default function Home() {
return (
<h1>
Hint: Click Tn The Top Left Menu Button
</h1>
);
}