memEx/lib/memex_web/live/home_live.ex

16 lines
364 B
Elixir
Raw Normal View History

2022-07-25 19:31:54 -04:00
defmodule MemexWeb.HomeLive do
2022-01-22 20:44:38 -05:00
@moduledoc """
Liveview for the main home page
"""
2022-07-25 19:31:54 -04:00
use MemexWeb, :live_view
2022-07-30 16:20:32 -04:00
alias Memex.Accounts
2022-11-26 20:36:09 -05:00
alias MemexWeb.{Endpoint, FaqLive}
2021-03-11 21:12:55 -05:00
@impl true
2022-05-05 20:55:59 -04:00
def mount(_params, _session, socket) do
2022-07-30 16:20:32 -04:00
admins = Accounts.list_users_by_role(:admin)
2022-11-26 20:36:09 -05:00
{:ok, socket |> assign(page_title: gettext("home"), admins: admins)}
2021-03-11 21:12:55 -05:00
end
end