Skip to content

Commit

Permalink
tweak: use index for key in detour direction list
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahpurcell committed Oct 21, 2024
1 parent eb472d6 commit 28e14e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ export const ActiveDetourPanel = ({
<h2 className="c-diversion-panel__h2">Detour Directions</h2>
{directions ? (
<ListGroup as="ol">
{directions.map((d) => (
<ListGroup.Item key={d.instruction} as="li">
{directions.map((d, i) => (
<ListGroup.Item key={i} as="li">
{d.instruction == "Regular Route" ? (
<strong className="fw-medium">{d.instruction}</strong>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ export const DrawDetourPanel = ({
<h2 className="c-diversion-panel__h2">Detour Directions</h2>
{directions ? (
<ListGroup as="ol">
{directions.map((d) => (
<ListGroup.Item key={d.instruction} as="li">
{directions.map((d, i) => (
<ListGroup.Item key={i} as="li">
{d.instruction == "Regular Route" ? (
<strong className="fw-medium">{d.instruction}</strong>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const PastDetourPanel = ({
<h2 className="c-diversion-panel__h2">Detour Directions</h2>
{directions ? (
<ListGroup as="ol">
{directions.map((d) => (
<ListGroup.Item key={d.instruction} as="li">
{directions.map((d, i) => (
<ListGroup.Item key={i} as="li">
{d.instruction == "Regular Route" ? (
<strong className="fw-medium">{d.instruction}</strong>
) : (
Expand Down

0 comments on commit 28e14e1

Please sign in to comment.