GoScrobble/web/src/App.js

55 lines
1.5 KiB
JavaScript
Raw Normal View History

import { Route, Switch, withRouter } from 'react-router-dom';
import Home from './Pages/Home';
import About from './Pages/About';
import Profile from './Pages/Profile';
import Artist from './Pages/Artist';
import Album from './Pages/Album';
import Track from './Pages/Track';
import User from './Pages/User';
import Admin from './Pages/Admin';
import Login from './Pages/Login';
import Register from './Pages/Register';
import Reset from './Pages/Reset';
import Navigation from './Components/Navigation';
2021-03-26 08:06:28 +00:00
import 'bootstrap/dist/css/bootstrap.min.css';
import './App.css';
2021-03-24 03:29:35 +00:00
2021-03-31 00:16:42 +00:00
const App = () => {
let boolTrue = true;
// Remove loading spinner on load
const el = document.querySelector(".loader-container");
if (el) {
el.remove();
}
return (
<div>
<Navigation />
<Switch>
2021-03-31 00:16:42 +00:00
<Route exact={boolTrue} path={["/", "/home"]} component={Home} />
<Route path="/about" component={About} />
<Route path="/user" component={User} />
<Route path="/u/:uuid" component={Profile} />
<Route path="/artist/:uuid" component={Artist} />
<Route path="/album/:uuid" component={Album} />
<Route path="/track/:uuid" component={Track} />
<Route path="/admin" component={Admin} />
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
<Route path="/reset/:token" component={Reset} />
<Route path="/reset" component={Reset} />
</Switch>
</div>
);
}
2021-03-31 00:16:42 +00:00
export default withRouter(App);