import { memo } from "preact/compat"; import type { RealtimeStation } from "mobility-toolbox-js/types"; import type { JSX, PreactDOMAttributes } from "preact"; export type StationNameProps = { station: RealtimeStation; } & JSX.HTMLAttributes & PreactDOMAttributes; function StationName({ children, station, ...props }: StationNameProps) { const { name } = station?.properties || {}; return (
{name} {children}
); } export default memo(StationName);