Make navigation work
This commit is contained in:
@@ -1,25 +1,41 @@
|
||||
import React from 'react';
|
||||
import logo from './logo.svg';
|
||||
import './App.css';
|
||||
import { Tabs, Tab, Navbar } from 'react-materialize';
|
||||
import MakeMoneyMove from './cash/MakeMoneyMove';
|
||||
import Cash from './cash/Cash';
|
||||
import { BrowserRouter as Router, Route, Link } from "react-router-dom";
|
||||
import RoutableNavItem from './common/RoutableNavItem';
|
||||
import {
|
||||
CRIB,
|
||||
MAKE_MONEY_MOVE
|
||||
} from './RouteNames';
|
||||
|
||||
function App() {
|
||||
|
||||
return (
|
||||
<div className="App">
|
||||
<header className="App-header">
|
||||
<img src={logo} className="App-logo" alt="logo" />
|
||||
<p>
|
||||
Edit <code>src/App.js</code> and save to reload.
|
||||
</p>
|
||||
<a
|
||||
className="App-link"
|
||||
href="https://reactjs.org"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Learn React
|
||||
</a>
|
||||
</header>
|
||||
</div>
|
||||
|
||||
<Router className="noscrolling">
|
||||
<Navbar brand={<div>GKS</div>} alignLinks="right">
|
||||
|
||||
<RoutableNavItem href={CRIB}>
|
||||
Crib
|
||||
</RoutableNavItem>
|
||||
|
||||
<RoutableNavItem>
|
||||
Homies
|
||||
</RoutableNavItem>
|
||||
|
||||
<RoutableNavItem href={MAKE_MONEY_MOVE}>
|
||||
Make Money Move
|
||||
</RoutableNavItem>
|
||||
|
||||
</Navbar>
|
||||
|
||||
<div className="autoscrolling">
|
||||
<Route exact path={CRIB} component={Cash} />
|
||||
<Route path={MAKE_MONEY_MOVE} component={MakeMoneyMove} />
|
||||
</div>
|
||||
</Router>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user