- <.nav_link route={~p"/"} section={:stats} nav_section={assigns[:nav_section]}>
+ <.nav_link route={~p"/"} section={:stats} current_section={@current_section}>
<.icon
name="hero-chart-pie"
class="max-sm:hidden h-4 w-4 mr-2"
@@ -16,7 +16,7 @@
<.nav_link
route={~p"/collection"}
section={:collection}
- nav_section={assigns[:nav_section]}
+ current_section={@current_section}
>
<.icon
name="hero-circle-stack"
@@ -26,7 +26,7 @@
/>
{gettext("Collection")}
- <.nav_link route={~p"/wishlist"} section={:wishlist} nav_section={assigns[:nav_section]}>
+ <.nav_link route={~p"/wishlist"} section={:wishlist} current_section={@current_section}>
<.icon
name="hero-star"
class="max-sm:hidden h-4 w-4 mr-2"
diff --git a/lib/music_library_web/live/artist_live/show.ex b/lib/music_library_web/live/artist_live/show.ex
index 65c2ce18..3b9307ba 100644
--- a/lib/music_library_web/live/artist_live/show.ex
+++ b/lib/music_library_web/live/artist_live/show.ex
@@ -63,7 +63,7 @@ defmodule MusicLibraryWeb.ArtistLive.Show do
|> group_and_sort()
socket
- |> assign(:nav_section, :artists)
+ |> assign(:current_section, :artists)
|> assign(:artist, artist)
|> assign(:artist_info, artist_info)
|> assign(:country, ArtistInfo.country(artist_info))
diff --git a/lib/music_library_web/live/collection_live/index.ex b/lib/music_library_web/live/collection_live/index.ex
index 52cbb55a..b3959abf 100644
--- a/lib/music_library_web/live/collection_live/index.ex
+++ b/lib/music_library_web/live/collection_live/index.ex
@@ -17,7 +17,7 @@ defmodule MusicLibraryWeb.CollectionLive.Index do
@impl true
def mount(_params, _session, socket) do
- {:ok, assign(socket, :nav_section, :collection)}
+ {:ok, assign(socket, :current_section, :collection)}
end
@impl true
diff --git a/lib/music_library_web/live/collection_live/show.ex b/lib/music_library_web/live/collection_live/show.ex
index 968ddc4f..160b24c6 100644
--- a/lib/music_library_web/live/collection_live/show.ex
+++ b/lib/music_library_web/live/collection_live/show.ex
@@ -38,7 +38,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
{:noreply,
socket
- |> assign(:nav_section, :collection)
+ |> assign(:current_section, :collection)
|> assign(:page_title, page_title(socket.assigns.live_action, record))
|> assign(:record, record)}
end
diff --git a/lib/music_library_web/live/stats_live/index.ex b/lib/music_library_web/live/stats_live/index.ex
index 69852ed2..370f1720 100644
--- a/lib/music_library_web/live/stats_live/index.ex
+++ b/lib/music_library_web/live/stats_live/index.ex
@@ -96,7 +96,7 @@ defmodule MusicLibraryWeb.StatsLive.Index do
scrobble_activity_mode: :albums,
latest_record: latest_record,
page_title: gettext("Stats"),
- nav_section: :stats,
+ current_section: :stats,
records_by_artist: records_by_artists,
records_by_genre: records_by_genre
)}
diff --git a/lib/music_library_web/live/wishlist_live/index.ex b/lib/music_library_web/live/wishlist_live/index.ex
index 8eff7387..03781949 100644
--- a/lib/music_library_web/live/wishlist_live/index.ex
+++ b/lib/music_library_web/live/wishlist_live/index.ex
@@ -20,7 +20,7 @@ defmodule MusicLibraryWeb.WishlistLive.Index do
{:ok,
socket
- |> assign(nav_section: :wishlist)
+ |> assign(current_section: :wishlist)
|> assign(:current_date, current_date)}
end
diff --git a/lib/music_library_web/live/wishlist_live/show.ex b/lib/music_library_web/live/wishlist_live/show.ex
index 4d09e3b2..199a43d3 100644
--- a/lib/music_library_web/live/wishlist_live/show.ex
+++ b/lib/music_library_web/live/wishlist_live/show.ex
@@ -18,7 +18,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
{:ok,
socket
- |> assign(nav_section: :wishlist)
+ |> assign(current_section: :wishlist)
|> assign(:current_date, current_date)}
end
@@ -28,7 +28,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
{:noreply,
socket
- |> assign(:nav_section, :wishlist)
+ |> assign(:current_section, :wishlist)
|> assign(:page_title, page_title(socket.assigns.live_action, record))
|> assign(:record, record)}
end