feat(ui): add header component
This commit is contained in:
parent
3be34ece88
commit
ba38e80bdb
|
@ -0,0 +1,31 @@
|
|||
import React from 'react'
|
||||
import { Link} from 'react-router-dom';
|
||||
|
||||
export default function Header(){
|
||||
|
||||
return (
|
||||
<>
|
||||
<Link
|
||||
to='/'
|
||||
>
|
||||
<button>
|
||||
Home
|
||||
</button>
|
||||
</Link>
|
||||
<Link
|
||||
to='https://www.swingbe.de/imprint/'
|
||||
>
|
||||
<button>
|
||||
Imprint
|
||||
</button>
|
||||
</Link>
|
||||
<Link
|
||||
to='https://www.swingbe.de/privacy-policy/'
|
||||
>
|
||||
<button>
|
||||
Privacy Policy
|
||||
</button>
|
||||
</Link>
|
||||
</>
|
||||
);
|
||||
};
|
|
@ -3,6 +3,8 @@ import { Link} from 'react-router-dom';
|
|||
|
||||
import '../style.css';
|
||||
import {getBusStopCount, getBikeRideCount, getParkRideCount, getTrainStationCount, getTaxiCount, getTicketMachineCount, getTicketOfficeCount} from '../utils/api';
|
||||
import Header from '../components/header';
|
||||
|
||||
export default function Home(){
|
||||
|
||||
const [bikeRideCount, setBikeRideCount] = useState('loading...');
|
||||
|
@ -96,27 +98,7 @@ export default function Home(){
|
|||
|
||||
return (
|
||||
<>
|
||||
<Link
|
||||
to='/'
|
||||
>
|
||||
<button>
|
||||
Home
|
||||
</button>
|
||||
</Link>
|
||||
<Link
|
||||
to='https://www.swingbe.de/imprint/'
|
||||
>
|
||||
<button>
|
||||
Imprint
|
||||
</button>
|
||||
</Link>
|
||||
<Link
|
||||
to='https://www.swingbe.de/privacy-policy/'
|
||||
>
|
||||
<button>
|
||||
Privacy Policy
|
||||
</button>
|
||||
</Link>
|
||||
<Header />
|
||||
<h1>RVB Display</h1>
|
||||
<h2>Wellcome to the RVB Display!</h2>
|
||||
<h3>Number of bike and ride (B&R) stations in the RVB area: {bikeRideCount}</h3>
|
||||
|
|
Loading…
Reference in New Issue