wip
This commit is contained in:
parent
66ced29c6d
commit
dbcfdcd0c3
41 changed files with 3637 additions and 791 deletions
33
src/frontend/App.tsx
Normal file
33
src/frontend/App.tsx
Normal file
|
@ -0,0 +1,33 @@
|
|||
import * as React from 'react';
|
||||
import { BrowserRouter, Route, Switch, useLocation } from 'react-router-dom';
|
||||
|
||||
import { IndexPage } from './pages';
|
||||
import { RankingPage } from './pages/ranking';
|
||||
import { Header } from './components/Header';
|
||||
|
||||
import 'xeltica-ui/dist/css/xeltica-ui.min.css';
|
||||
import './style.scss';
|
||||
|
||||
const AppInner : React.VFC = () => {
|
||||
const $location = useLocation();
|
||||
return (
|
||||
<>
|
||||
<div className="container">
|
||||
{$location.pathname !== '/' && <Header hasTopLink />}
|
||||
<Switch>
|
||||
<Route exact path="/" component={IndexPage} />
|
||||
<Route exact path="/ranking" component={RankingPage} />
|
||||
</Switch>
|
||||
<footer className="text-center pa-5">
|
||||
(C)2020-2021 Xeltica
|
||||
</footer>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export const App: React.VFC = () => (
|
||||
<BrowserRouter>
|
||||
<AppInner />
|
||||
</BrowserRouter>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue