Sort search results alphabetically

This commit is contained in:
Harshad Sharma 2024-05-19 14:59:13 +05:30
parent 2c9fab28a4
commit be215c85da

View file

@ -167,7 +167,7 @@ defmodule FreediveWeb.ServiceLive.Components do
def items_block(assigns) do
~H"""
<%= for {_name, item} <- @items do %>
<%= for {_name, item} <- Enum.sort(@items, fn {a, _}, {b, _} -> a < b end) do %>
<.service_preview item={item} selected_item={@selected_item} />
<% end %>
"""