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-11-27 21:33:06 -05:00
|
|
|
@version Mix.Project.config()[:version]
|
|
|
|
|
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-27 21:33:06 -05:00
|
|
|
{:ok, socket |> assign(page_title: gettext("home"), admins: admins, version: @version)}
|
2021-03-11 21:12:55 -05:00
|
|
|
end
|
|
|
|
end
|