Skip to content

Commit

Permalink
cleanup: Replace if statement with :if directive in <.itinerary_summa…
Browse files Browse the repository at this point in the history
…ry /> (#2315)
  • Loading branch information
joshlarson authored Jan 9, 2025
1 parent 3487745 commit 0928ac3
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/dotcom_web/components/trip_planner/itinerary_summary.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,12 @@ defmodule DotcomWeb.Components.TripPlanner.ItinerarySummary do
<div class="flex items-center -space-x-0.5">
<%= for {route, index} <- Enum.with_index(@routes) do %>
<.route_symbol route={route} class={"#{@grouped_classes} #{zindex(index)} #{@class}"} />
<%= if @slashed? and index < Kernel.length(@routes) - 1 do %>
<div class={"bg-white -mt-0.5 w-1 h-7 #{zindex(index)} transform rotate-[17deg]"}></div>
<% end %>
<div
:if={@slashed? and index < Kernel.length(@routes) - 1}
class={"bg-white -mt-0.5 w-1 h-7 #{zindex(index)} transform rotate-[17deg]"}
>
</div>
<% end %>
</div>
"""
Expand Down

0 comments on commit 0928ac3

Please sign in to comment.