My space on the web
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
443 B

defmodule MirageWeb.HomeLive do
use MirageWeb, :live_view
@impl true
def mount(_params, %{"user_id" => user_id}, socket) do
current_user = user_id && Mirage.Accounts.get_user!(user_id)
home_note = Mirage.Notes.get_note_by_title("@home")
settings = Mirage.Settings.list_settings_as_map()
assign(socket, %{
_s: settings,
home_note: home_note,
current_user: current_user