Compare commits

...

4 Commits

Author SHA1 Message Date
dancingCycle ac91c2b741 chore: adjust url for API call 2023-07-25 18:17:42 +02:00
dancingCycle 6d94dc0732 chore: adjust url for API call 2023-07-25 18:15:01 +02:00
dancingCycle 82b92eac86 feat: clear Home page 2023-07-25 18:04:06 +02:00
dancingCycle b5e4f567a3 feat: adjust home page 2023-02-15 15:38:11 +01:00
4 changed files with 10 additions and 5 deletions

View File

@ -19,7 +19,7 @@ export default function App() {
<BrowserRouter>
<NavBar />
<Routes>
<Route path="/" element={<Map />} />
<Route path="/" element={<Home />} />
<Route path="/table" element={<Table />} />
<Route path="/map" element={<Map />} />
<Route path="/contact" element={<Contact />} />

View File

@ -1,8 +1,10 @@
import React from 'react';
import React, {useState} from 'react';
import axios from 'axios';
export default function Home() {
return (
<>
<h1>Home</h1>
<p>Home</p>
</>
);
}

View File

@ -12,7 +12,8 @@ export default function MapPage() {
/*TODO handle errors: https://www.valentinog.com/blog/await-react/*/
//TODO Make fields available via configuration!
let url = 'https://api.entur.io/realtime/v1/gtfs-rt/vehicle-positions';
//let url = 'https://api.entur.io/realtime/v1/gtfs-rt/vehicle-positions';
let url = 'https://gtfs.openov.nl/gtfs-rt/vehiclePositions.pb';
const res = await axios.get(url,
{

View File

@ -10,7 +10,9 @@ export default function TablePage() {
try {
/*TODO handle errors: https://www.valentinog.com/blog/await-react/*/
//TODO Make fields available via configuration!
let url = 'https://api.entur.io/realtime/v1/gtfs-rt/vehicle-positions';
//let url = 'https://api.entur.io/realtime/v1/gtfs-rt/vehicle-positions';
let url = 'https://gtfs.openov.nl/gtfs-rt/vehiclePositions.pb'
const res = await axios.get(url,
{
responseType: 'arraybuffer'