Add client-side routing
This commit is contained in:
@ -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>
|
||||
);
|
||||
}
|
||||
|
@ -8,6 +8,11 @@
|
||||
border-top: 2px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
#bottomMenu a {
|
||||
display: contents;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#bottomMenu button {
|
||||
background: none;
|
||||
border: none;
|
||||
|
17
src/components/pages/Tickets.js
Normal file
17
src/components/pages/Tickets.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import Header from '../Header.js'
|
||||
import MainArea from '../MainArea.js'
|
||||
|
||||
class Tickets extends Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Header title="Biljetter" />
|
||||
<MainArea />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Tickets;
|
17
src/components/pages/TicketsBuy.js
Normal file
17
src/components/pages/TicketsBuy.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import Header from '../Header.js'
|
||||
import MainArea from '../MainArea.js'
|
||||
|
||||
class TicketsBuy extends Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Header title="Köp biljett" />
|
||||
<MainArea />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TicketsBuy;
|
17
src/components/pages/Travel.js
Normal file
17
src/components/pages/Travel.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import Header from '../Header.js'
|
||||
import MainArea from '../MainArea.js'
|
||||
|
||||
class Travel extends Component {
|
||||
render() {
|
||||
return (
|
||||
<>
|
||||
<Header title="Reseplanering" />
|
||||
<MainArea />
|
||||
</>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Travel;
|
Reference in New Issue
Block a user