added router
This commit is contained in:
12
src/App.tsx
12
src/App.tsx
@@ -1,10 +1,18 @@
|
||||
import React from "react"
|
||||
import FileBrowser from "./components/FileBrowser"
|
||||
|
||||
import { BrowserRouter as Router, Switch, Route, Redirect } from "react-router-dom"
|
||||
import NotFound from "./components/NotFound"
|
||||
|
||||
const App: React.FC = () => {
|
||||
return (
|
||||
<div>
|
||||
<FileBrowser/>
|
||||
<Router>
|
||||
<Switch>
|
||||
<Route path="/f/" component={FileBrowser}/>
|
||||
<Redirect from="/" exact to="/f/" />
|
||||
<Route path="*" component={NotFound} />
|
||||
</Switch>
|
||||
</Router>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user