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