diff --git a/src/routePlanner/marker.tsx b/src/routePlanner/marker.tsx index fb09b0b..237b2e5 100644 --- a/src/routePlanner/marker.tsx +++ b/src/routePlanner/marker.tsx @@ -1,14 +1,14 @@ import { MarkerProps } from './types'; -export const MarkerComponent = ({ marker }: MarkerProps) => { +export const MarkerComponent = ({ marker, isFirst, isLast }: MarkerProps) => { return (
  • {`Waypoint ${marker.label} (${marker.key.substring(0, 4)})`} - - diff --git a/src/routePlanner/markers.tsx b/src/routePlanner/markers.tsx index 31d64d1..7c05b04 100644 --- a/src/routePlanner/markers.tsx +++ b/src/routePlanner/markers.tsx @@ -37,8 +37,13 @@ export const MarkersComponent = ({ <>

    Markers

      - {markers.map((marker) => ( - + {markers.map((marker, i) => ( + ))}
    diff --git a/src/routePlanner/types.ts b/src/routePlanner/types.ts index 58c3e7a..678b4ef 100644 --- a/src/routePlanner/types.ts +++ b/src/routePlanner/types.ts @@ -3,8 +3,8 @@ import { Coordinates, Waypoint } from '../shared/types'; export type Marker = Waypoint & { key: string; remove: () => void; - moveUp?: () => void; - moveDown?: () => void; + moveUp: () => void; + moveDown: () => void; label: string; }; @@ -49,4 +49,6 @@ export type ExportProps = { export type MarkerProps = { marker: Marker; + isFirst: boolean; + isLast: boolean; };