redirect from signin page is logged in

This commit is contained in:
Chris McCord 2024-06-05 20:39:34 -04:00
parent dbf5cc32f3
commit a68a9a8d51

View file

@ -32,6 +32,10 @@ defmodule LiveBeatsWeb.SignInLive do
end end
def mount(_params, _session, socket) do def mount(_params, _session, socket) do
if user = socket.assigns.current_user do
{:ok, redirect(socket, to: profile_path(user))}
else
{:ok, socket} {:ok, socket}
end end
end end
end