Skip to content

Commit

Permalink
when the destination has an id, render it as a link (#2146)
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull authored Aug 15, 2024
1 parent f3a8bbb commit b6fa9e1
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/dotcom_web/templates/trip_plan/_itinerary.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
<div class="route-branch-stop-list route-branch-stop personal-itinerary">
<%= DotcomWeb.PartialView.StopBubbles.render_stop_bubbles([%Dotcom.StopBubble.Params{render_type: :terminus, class: "terminus", show_line?: false, show_checkmark?: true}]) %>
<div class="itinerary-step">
<% {destination_name, _destination_id, arrival_time, alerts} = @itinerary_row_list.destination %>
<span class="itinerary-instructions notranslate">
<%= destination_name %>
</span>
<% {destination_name, destination_id, arrival_time, alerts} = @itinerary_row_list.destination %>
<%= if destination_id != nil do %>
<%= link destination_name, to: stop_path(@conn, :show, destination_id), class: "itinerary-destination notranslate" %>
<% else %>
<span class="itinerary-instructions notranslate">
<%= destination_name %>
</span>
<% end %>
<%= render "_itinerary_alert.html",
itinerary_idx: @index,
stop_id: "stop",
Expand Down

0 comments on commit b6fa9e1

Please sign in to comment.