Skip to content

Commit

Permalink
cleanup (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassth authored Jun 2, 2024
1 parent aee6dda commit f24bc3c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/components/nav/NavBar.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { BaseBarComponents } from "./BaseBarComponents";
import { BaseBarComponents } from "./BaseBarComponents.js";
import style from "./NavBar.module.css";

export function NavBar({ width }: { width: number }) {
return (
<nav
className={
width >= 800
? style["nav-bar"] + " " + style["side-nav"]
: style["nav-bar"] + " " + style["bottom-nav"]
? `${style["nav-bar"]} ${style["side-nav"]}`
: `${style["nav-bar"]} ${style["bottom-nav"]}`
}
>
<BaseBarComponents width={width} />
Expand Down
7 changes: 4 additions & 3 deletions src/routes/RelativeVehiclePosition.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,17 @@ export default function RelativeVehiclePosition() {
useEffect(() => {
document.title = `Stop ID ${stopNum} | TTC arrivals`;
});
useEffect(() => {
updateData();
}, []);

const updateData = (vehicle: number = vehicleId) => {
getVehicleLocation(vehicle).then((res) => {
setData(res);
});
};

useEffect(() => {
updateData();
}, []);

const onRefreshClick = useCallback(() => {
updateData();
}, []);
Expand Down

0 comments on commit f24bc3c

Please # to comment.