Last change
on this file since 1 was 1, checked in by Bart Vastenhouw, 5 years ago |
First public release
|
File size:
901 bytes
|
Line | |
---|
1 | import React, { useState } from 'react';
|
---|
2 |
|
---|
3 | import 'bootstrap/dist/css/bootstrap.css';
|
---|
4 | import '@fortawesome/fontawesome-free/css/all.css';
|
---|
5 |
|
---|
6 | import './main.css';
|
---|
7 |
|
---|
8 | import NavBar from './Navbar';
|
---|
9 | import Genius from './Genius';
|
---|
10 | import RunServer from './RunServer';
|
---|
11 | import { ProfilesServer } from './ProfilesServer';
|
---|
12 | import { PartiesServer } from './PartiesServer';
|
---|
13 |
|
---|
14 | function App() {
|
---|
15 | const [loc, setLoc] = useState('/');
|
---|
16 |
|
---|
17 | const loc_ = loc.split('/')[1]; // for future parsing
|
---|
18 |
|
---|
19 | return (
|
---|
20 | <div>
|
---|
21 | <NavBar loc={loc_} setLoc={setLoc} />
|
---|
22 | <div className="container text-center">
|
---|
23 | {loc_ === '' && <Genius setLoc={setLoc} />}
|
---|
24 | {loc_ === 'rs' && <RunServer loc={loc} setLoc={setLoc} />}
|
---|
25 | {loc_ === 'prs' && <ProfilesServer loc={loc} setLoc={setLoc} />}
|
---|
26 | {loc_ === 'pas' && <PartiesServer loc={loc} setLoc={setLoc} />}
|
---|
27 | </div>
|
---|
28 | </div>
|
---|
29 | );
|
---|
30 | }
|
---|
31 |
|
---|
32 | export default App;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.