"use client"; import { useMemo, useState } from "react"; import { allBusStops, findBusStopByCode, nearestBusStops, type BusStop } from "@/lib/busstops"; import { Icon } from "@/components/Icons"; import { useLang } from "@/components/LangProvider"; type Mode = "code" | "place"; function BusStopCard({ stop, distM }: { stop: BusStop; distM?: number }) { const { lang } = useLang(); return (
{stop.position} · {stop.type}
{(stop["buses-line"] ?? []).length > 0 && ({lang === "en" ? "Cannot access your location." : "ไม่สามารถเข้าถึงตำแหน่งของคุณได้"}
)} {codeResult &&