feat(ui): add header component

This commit is contained in:
dancingCycle 2023-08-15 21:28:30 +02:00
parent 3be34ece88
commit ba38e80bdb
2 changed files with 34 additions and 21 deletions

View File

@ -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>
</>
);
};

View File

@ -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>