Rename nav_section -> current_section

This commit is contained in:
Claudio Ortolina
2025-05-14 10:49:12 +01:00
parent dda355e764
commit f36b829377
8 changed files with 13 additions and 13 deletions
@@ -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))
@@ -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
@@ -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
@@ -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
)}
@@ -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
@@ -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