diff --git a/assets/src/components/detours/detourPanels/activeDetourPanel.tsx b/assets/src/components/detours/detourPanels/activeDetourPanel.tsx index 1a475e018..58b4f7625 100644 --- a/assets/src/components/detours/detourPanels/activeDetourPanel.tsx +++ b/assets/src/components/detours/detourPanels/activeDetourPanel.tsx @@ -80,12 +80,6 @@ export const ActiveDetourPanel = ({ routeDirection={routeDirection} /> - {connectionPoints && ( - - )} - - {missedStops && } -

Detour Directions

{directions ? ( @@ -102,6 +96,12 @@ export const ActiveDetourPanel = ({ ) : null}
+ + {connectionPoints && ( + + )} + + {missedStops && } diff --git a/assets/src/components/detours/detourPanels/pastDetourPanel.tsx b/assets/src/components/detours/detourPanels/pastDetourPanel.tsx index 6765d33f4..f2f50560d 100644 --- a/assets/src/components/detours/detourPanels/pastDetourPanel.tsx +++ b/assets/src/components/detours/detourPanels/pastDetourPanel.tsx @@ -65,12 +65,6 @@ export const PastDetourPanel = ({ routeDirection={routeDirection} /> - {connectionPoints && ( - - )} - - {missedStops && } -

Detour Directions

{directions ? ( @@ -87,6 +81,12 @@ export const PastDetourPanel = ({ ) : null}
+ + {connectionPoints && ( + + )} + + {missedStops && } diff --git a/assets/src/components/detours/diversionPage.tsx b/assets/src/components/detours/diversionPage.tsx index b23da9cee..342fb78d8 100644 --- a/assets/src/components/detours/diversionPage.tsx +++ b/assets/src/components/detours/diversionPage.tsx @@ -143,17 +143,17 @@ export const DiversionPage = ({ `Detour ${routeName} ${routeDirection}`, routeOrigin, , + "Turn-by-Turn Directions:", + ...(editedDirections + ? [editedDirections] + : extendedDirections?.map((v) => v.instruction) ?? []), + , "Connection Points:", connectionPoints?.start?.name ?? "N/A", connectionPoints?.end?.name ?? "N/A", , `Missed Stops (${missedStops?.length}):`, ...(missedStops?.map(({ name }) => name) ?? ["no stops"]), - , - "Turn-by-Turn Directions:", - ...(editedDirections - ? [editedDirections] - : extendedDirections?.map((v) => v.instruction) ?? []), ].join("\n") const routes = useContext(RoutesContext) diff --git a/assets/tests/components/detours/diversionPage.test.tsx b/assets/tests/components/detours/diversionPage.test.tsx index 13be7cc9f..83f466486 100644 --- a/assets/tests/components/detours/diversionPage.test.tsx +++ b/assets/tests/components/detours/diversionPage.test.tsx @@ -1291,19 +1291,19 @@ describe("DiversionPage", () => { `Detour ${routeName} ${routeDirection}`, routeOrigin, , - "Connection Points:", - start.name, - end.name, - , - `Missed Stops (${stops.length}):`, - ...stops.map(({ name }) => name), - , "Turn-by-Turn Directions:", "From Avenue 1 & Street 2", "Turn left on Main Street", "Turn right on High Street", "Turn sharp right on Broadway", "Regular Route", + , + "Connection Points:", + start.name, + end.name, + , + `Missed Stops (${stops.length}):`, + ...stops.map(({ name }) => name), ].join("\n") ) )