Skip to content

Commit

Permalink
feat: (tiny) Add "return to route" message after turn-by-turn directi…
Browse files Browse the repository at this point in the history
…ons (#2515)

* feat: (tiny) Add "return to route" message after turn-by-turn directions

* Use strong for accessibility, with added bootstrap class for font-weight

Co-authored-by: Kayla Firestack <[email protected]>
  • Loading branch information
hannahpurcell and firestack authored Mar 22, 2024
1 parent a981349 commit 2ccecdd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions assets/src/components/detours/diversionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export const DiversionPage = ({
,
"Turn-by-Turn Directions:",
...(directions?.map((v) => v.instruction) ?? []),
"Return to Regular Route",
,
"Connection Points:",
connectionPoints?.start?.name ?? "N/A",
Expand Down
5 changes: 5 additions & 0 deletions assets/src/components/detours/diversionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ export const DiversionPanel = ({
{d.instruction}
</ListGroup.Item>
))}
{detourFinished && (
<ListGroup.Item as="li">
<strong className="fw-medium">Return to Regular Route</strong>
</ListGroup.Item>
)}
</ListGroup>
) : (
<DirectionsHelpText />
Expand Down
1 change: 1 addition & 0 deletions assets/tests/components/detours/diversionPage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ describe("DiversionPage", () => {
"Turn left on Main Street",
"Turn right on High Street",
"Turn sharp right on Broadway",
"Return to Regular Route",
,
"Connection Points:",
start.name,
Expand Down

0 comments on commit 2ccecdd

Please sign in to comment.