diff --git a/lib/live_beats_web/live/nav.ex b/lib/live_beats_web/live/nav.ex
index fb7a777..aa89f05 100644
--- a/lib/live_beats_web/live/nav.ex
+++ b/lib/live_beats_web/live/nav.ex
@@ -3,7 +3,13 @@ defmodule LiveBeatsWeb.Nav do
alias LiveBeats.MediaLibrary
- def on_mount(:default, _params, _session, socket) do
- {:cont, assign(socket, :active_users, MediaLibrary.list_active_profiles(limit: 20))}
+ def on_mount(:default, params, _session, socket) do
+ active_tab =
+ case params do
+ %{"profile_username" => _profile} -> :index
+ _ -> :settings
+ end
+
+ {:cont, assign(socket, [active_users: MediaLibrary.list_active_profiles(limit: 20), active_tab: active_tab])}
end
end
diff --git a/lib/live_beats_web/templates/layout/live.html.heex b/lib/live_beats_web/templates/layout/live.html.heex
index 2e890b9..406c458 100644
--- a/lib/live_beats_web/templates/layout/live.html.heex
+++ b/lib/live_beats_web/templates/layout/live.html.heex
@@ -28,7 +28,7 @@
@@ -73,7 +73,7 @@