We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e87f2d4 commit ae2313fCopy full SHA for ae2313f
lib/algora_web/live/home_live.ex
@@ -89,7 +89,10 @@ defmodule AlgoraWeb.HomeLive do
89
)
90
91
case socket.assigns[:current_user] do
92
- nil ->
+ %{handle: handle} = user when is_binary(handle) ->
93
+ {:ok, redirect(socket, to: AlgoraWeb.UserAuth.signed_in_path(user))}
94
+
95
+ _ ->
96
{:ok,
97
socket
98
|> assign(:page_title, "Algora - The open source Upwork for engineers")
@@ -110,9 +113,6 @@ defmodule AlgoraWeb.HomeLive do
110
113
|> assign(:share_drawer_type, nil)
111
114
|> assign(:show_share_drawer, false)
112
115
|> assign(:transactions, transactions)}
-
- user ->
- {:ok, redirect(socket, to: AlgoraWeb.UserAuth.signed_in_path(user))}
116
end
117
118
0 commit comments