Add client-side routing

This commit is contained in:
André Wahlberg
2020-11-20 17:52:22 +01:00
parent ae8ef6fc57
commit a7e177905e
6 changed files with 89 additions and 19 deletions

View File

@ -1,17 +1,28 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
import BottomMenuButton from './BottomMenuButton';
import './css/BottomMenu.css';
import ticketsIcon from '../img/tickets.svg';
import buyTicketsIcon from '../img/tickets+.svg';
import ticketsBuyIcon from '../img/tickets+.svg';
import travelIcon from '../img/tram.svg';
import BottomMenuButton from './BottomMenuButton';
class BottomMenu extends Component {
render() {
return (
<div id="bottomMenu">
<BottomMenuButton label="Biljetter" icon={ticketsIcon}/>
<BottomMenuButton label="Köp biljett" icon={buyTicketsIcon}/>
<BottomMenuButton label="Reseplanering" icon={travelIcon}/>
<Link to="/tickets">
<BottomMenuButton label="Biljetter" icon={ticketsIcon}/>
</Link>
<Link to="/ticketsBuy">
<BottomMenuButton label="Köp biljett" icon={ticketsBuyIcon}/>
</Link>
<Link to="/travel">
<BottomMenuButton label="Reseplanering" icon={travelIcon}/>
</Link>
</div>
);
}