sim16/simmadome/src/index.tsx

44 lines
1.8 KiB
TypeScript
Raw Normal View History

2021-01-06 19:05:58 +00:00
import React from 'react';
import ReactDOM from 'react-dom';
2021-01-08 05:29:39 +00:00
import { BrowserRouter as Router, Switch, Route } from 'react-router-dom';
2021-01-06 19:05:58 +00:00
import './index.css';
2021-01-08 05:29:39 +00:00
import GamesPage from './GamesPage';
import GamePage from './GamePage';
2021-01-10 06:27:30 +00:00
import CreateLeague from './CreateLeague';
2021-01-06 19:05:58 +00:00
import discordlogo from "./img/discord.png";
import reportWebVitals from './reportWebVitals';
2021-01-11 04:47:49 +00:00
2021-01-11 19:14:54 +00:00
ReactDOM.render(
<React.StrictMode>
<Router>
<Header />
<Switch>
<Route path="/game/:id" component={GamePage}/>
<Route path="/create_league" component={CreateLeague} />
<Route path="/" component={GamesPage}/>
</Switch>
</Router>
</React.StrictMode>,
document.getElementById('root')
);
2021-01-06 19:05:58 +00:00
function Header() {
return (
<div id="header">
<div id="link_div">
<a href="https://www.patreon.com/sixteen" className="link" target="_blank" rel="noopener noreferrer">Patreon</a><br />
<a href="https://github.com/Sakimori/matteo-the-prestige" className="link" target="_blank" rel="noopener noreferrer">Github</a><br />
<a href="https://twitter.com/intent/follow?screen_name=SIBR_XVI" className="link" target="_blank" rel="noopener noreferrer">Twitter</a>
</div>
<a href="/" className="page_header"><h2 className="page_header" style={{fontSize:"50px"} as React.CSSProperties}>THE SIMMADOME</h2></a>
2021-01-06 19:05:58 +00:00
<h2 className="page_header">Join SIBR on <a href="https://discord.gg/UhAajY2NCW" className="link"><img src={discordlogo} alt="" height="30"/></a> to start your own games!</h2>
</div>
);
}
// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();