diff --git a/lib/algora_web/live/user/nav.ex b/lib/algora_web/live/user/nav.ex index b775406c6..3e8423e3d 100644 --- a/lib/algora_web/live/user/nav.ex +++ b/lib/algora_web/live/user/nav.ex @@ -47,6 +47,24 @@ defmodule AlgoraWeb.User.Nav do def assign_nav_items(%{assigns: %{current_user: nil}} = socket, _mode), do: socket def assign_nav_items(socket, :default) do + nav = [ + %{ + title: nil, + items: [ + %{label: "Dashboard", icon: "tabler-layout-dashboard", href: ~p"/home", tab: :dashboard}, + %{label: "Bounties", icon: "tabler-diamond", href: ~p"/bounties", tab: :bounties}, + %{label: "Projects", icon: "tabler-building", href: ~p"/projects", tab: :projects}, + %{label: "Transactions", icon: "tabler-receipt", href: ~p"/user/transactions", tab: :transactions}, + %{label: "Settings", icon: "tabler-settings", href: ~p"/user/settings", tab: :settings}, + %{label: "Installations", icon: "tabler-plug", href: ~p"/user/installations", tab: :installations} + ] + } + ] + + assign(socket, :nav, nav) + end + + def assign_nav_items(socket, :viewer) do assign(socket, :nav, []) end end diff --git a/lib/algora_web/router.ex b/lib/algora_web/router.ex index 4845f1095..2ea1332d7 100644 --- a/lib/algora_web/router.ex +++ b/lib/algora_web/router.ex @@ -70,6 +70,7 @@ defmodule AlgoraWeb.Router do live_session :authenticated, layout: {AlgoraWeb.Layouts, :user}, on_mount: [{AlgoraWeb.UserAuth, :ensure_authenticated}, Nav] do + live "/home", User.DashboardLive, :index live "/user/transactions", User.TransactionsLive, :index live "/user/settings", User.SettingsLive, :edit live "/user/installations", User.InstallationsLive, :index