diff --git a/app/components/Bulletin.tsx b/app/components/Bulletin.tsx index 6e437d6..798c690 100644 --- a/app/components/Bulletin.tsx +++ b/app/components/Bulletin.tsx @@ -29,10 +29,10 @@ export function Bulletin(props: { routes: Record; stop: Stop; wal return vehicle.minutes_until_arrival > props.walk_time / 2; }); - return ( + return times.length > 0 ? (
@@ -54,7 +54,7 @@ export function Bulletin(props: { routes: Record; stop: Stop; wal ) : undefined}
- ); + ) : undefined; }); }) ) : ( diff --git a/app/components/Message.tsx b/app/components/Message.tsx index 4cb8adf..214a5e3 100644 --- a/app/components/Message.tsx +++ b/app/components/Message.tsx @@ -17,11 +17,11 @@ export function Message(props: { routes: Record; name: string; he {props.headers.length > 0 ? (

- {props.headers[props.index].split(/(\[.*?\])/).map((text) => { + {props.headers[props.index].split(/(\[.*?\])/).map((text, index) => { if (text.length == 0) return; if (text.substring(0, 1) != "[" || text.substring(text.length - 1) != "]") return text; return ( -
+
); diff --git a/app/page.tsx b/app/page.tsx index 458b0a0..b69a9fc 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -112,7 +112,7 @@ export default function Home() { {Object.values(config.subway).map((value) => { return ( { return (