diff --git a/lightning/src/components/AccordionTest.tsx b/lightning/src/components/AccordionTest.tsx index 16a8dc1..dc0cc60 100644 --- a/lightning/src/components/AccordionTest.tsx +++ b/lightning/src/components/AccordionTest.tsx @@ -24,44 +24,63 @@ function ChevronUpIcon(props: JSX.IntrinsicElements['svg']) { }; export default function AccordionTest() { - const [stations, {setStationsRequest}] = useStationsContext(); + const [stations, { setStationsRequest }] = useStationsContext(); return ( - -

Find Stations

- + pretty list broke

}> -
- - Loading...
}> - {(station) => ( - - - {({ isSelected }) => (<> - {station.Loc.Stations[0].Name} -
- -
- )} -
-
- -
    -
  • Distance: {station.Dist}
  • -
  • {station.Loc.StreetAddress}
  • -
  • {station.Loc.City}, {station.Loc.State} {station.Loc.Zip} {station.Loc.Country}
  • -
  • {station.Loc.CoordinateString}, {station.Loc.GeocodeStatus}
  • -
-
-
)} - - - + + Loading...}> + {(station) => ( + + + {({ isSelected }) => (<> + {station.Loc.Stations[0].Name} +
+ +
+ )} +
+
+ +
    +
  • Distance: {station.Dist}
  • +
  • {station.Loc.StreetAddress}
  • +
  • {station.Loc.City}, {station.Loc.State} {station.Loc.Zip} {station.Loc.Country}
  • +
  • {station.Loc.CoordinateString}, {station.Loc.GeocodeStatus}
  • +
+
+
)} +
+
) as JSX.Element; diff --git a/lightning/src/components/map/MapScatLayer.tsx b/lightning/src/components/map/MapScatLayer.tsx index 956ff81..7becebb 100644 --- a/lightning/src/components/map/MapScatLayer.tsx +++ b/lightning/src/components/map/MapScatLayer.tsx @@ -17,7 +17,7 @@ export default function MapScatLayer(props: any) { const [scats, setScats] = createSignal([]); - function getCoords(stations) { + async function getCoords(stations) { if (stations() === undefined) { return } else if (stations.loading) { @@ -27,6 +27,7 @@ export default function MapScatLayer(props: any) { } else { let buf: ScatData[] = []; for (const station of stations()) { + // long lat buf.push({ coordinates: [station.Loc.Coordinates[1], station.Loc.Coordinates[0]] }) }; return buf; diff --git a/lightning/src/root.css b/lightning/src/root.css index bb47d92..3059ff7 100644 --- a/lightning/src/root.css +++ b/lightning/src/root.css @@ -16,3 +16,34 @@ a { margin-right: 1rem; } +main { + max-height: 90vh; + overflow-y: scroll; + overflow-x: hidden; + background-color: rgba(0,0,0,0.9); + border-radius: 20px; + padding: 10px; + margin-top: 1rem; + box-shadow: 5px 5px 15px 10px black; +} +/* width */ +::-webkit-scrollbar { + width: 10px; +} + +/* Track */ +::-webkit-scrollbar-track { + box-shadow: inset 0 0 5px #333; + border-radius: 10px; +} + +/* Handle */ +::-webkit-scrollbar-thumb { + background: #666; + border-radius: 10px; +} + +/* Handle on hover */ +::-webkit-scrollbar-thumb:hover { + background: #999; +} diff --git a/lightning/src/routes/stations.tsx b/lightning/src/routes/stations.tsx index 2269d94..7f76d6a 100644 --- a/lightning/src/routes/stations.tsx +++ b/lightning/src/routes/stations.tsx @@ -14,14 +14,14 @@ const TEST_PACKET: StationRequest = { }; export default function Stations() { - const [stations, {setStationsRequest}] = useStationsContext(); + const [stations, { setStationsRequest }] = useStationsContext(); setStationsRequest(TEST_PACKET); return ( - <> +
Ride the Lightning - +
) as JSX.Element; };