diff --git a/lib/livebook_web/live/apps_live.ex b/lib/livebook_web/live/apps_live.ex index 445458965..80a15520c 100644 --- a/lib/livebook_web/live/apps_live.ex +++ b/lib/livebook_web/live/apps_live.ex @@ -11,7 +11,13 @@ defmodule LivebookWeb.AppsLive do apps = Livebook.Apps.list_authorized_apps(socket.assigns.current_user) empty_apps_path? = Livebook.Apps.empty_apps_path?() - {:ok, assign(socket, apps: apps, empty_apps_path?: empty_apps_path?)} + {:ok, + assign(socket, + apps: apps, + empty_apps_path?: empty_apps_path?, + logout_enabled?: + Livebook.Config.logout_enabled?() and socket.assigns.current_user.email != nil + )} end @impl true @@ -24,10 +30,10 @@ defmodule LivebookWeb.AppsLive do <:toggle> - <.menu_item :if={Livebook.Config.logout_enabled?() and @current_user.email != nil}> + <.menu_item :if={@logout_enabled?}>