Compare commits
3 Commits
main
...
gtfs-rt-mb
Author | SHA1 | Date |
---|---|---|
dancingCycle | 6d94dc0732 | |
dancingCycle | 82b92eac86 | |
dancingCycle | b5e4f567a3 |
|
@ -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 />} />
|
||||
|
|
|
@ -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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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://cdn.mbta.com/realtime/VehiclePositions.pb';
|
||||
|
||||
const res = await axios.get(url,
|
||||
{
|
||||
|
|
|
@ -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://cdn.mbta.com/realtime/VehiclePositions.pb';
|
||||
|
||||
const res = await axios.get(url,
|
||||
{
|
||||
responseType: 'arraybuffer'
|
||||
|
|
Loading…
Reference in New Issue