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.
 
 
 
 
 

23 lines
590 B

defmodule MirageWeb.InboxLive 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)
unlinked = Mirage.Notes.list_notes(:unlinked)
untagged = Mirage.Notes.list_notes(:untagged)
at = Mirage.Notes.list_notes(:at)
today = Mirage.Notes.list_notes(:today)
{:ok,
assign(socket, %{
current_user: current_user,
notes: %{
today: today,
at: at,
untagged: untagged,
unlinked: unlinked
}
})}
end
end