diff --git a/lib/exmr_web/live/exam_live/index.ex b/lib/exmr_web/live/exam_live/index.ex index bc05f1f..b2adc09 100644 --- a/lib/exmr_web/live/exam_live/index.ex +++ b/lib/exmr_web/live/exam_live/index.ex @@ -8,8 +8,8 @@ defmodule ExmrWeb.ExamLive.Index do def mount(_params, _session, socket) do socket = socket - |> assign(:exams, Exams.list_exams()) |> assign(:sort_by, "date") + |> assign(:exams, sort_items(Exams.list_exams(), "date")) |> assign(:live_action, :index) |> assign(exam: %{}) |> assign(events: Enum.group_by(Exams.list_exams(), & &1.date))