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
def mount(_params, _session, socket) do
{:ok, socket}
if user = socket.assigns.current_user do
{:ok, redirect(socket, to: profile_path(user))}
else
{:ok, socket}
end
end
end