Remove back links from detail views

Never used them, can be removed
This commit is contained in:
Claudio Ortolina
2024-12-23 17:14:57 +00:00
parent f71fa6fa25
commit 1102c40d16
5 changed files with 25 additions and 65 deletions
@@ -7,15 +7,6 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
@impl true
def mount(_params, _session, socket) do
back_url =
if connected?(socket) do
socket
|> get_connect_params()
|> Map.get("_live_referer", ~p"/collection")
else
~p"/collection"
end
socket =
if static_changed?(socket) do
put_flash(socket, :warning, gettext("The application has been updated, please reload."))
@@ -23,7 +14,7 @@ defmodule MusicLibraryWeb.CollectionLive.Show do
socket
end
{:ok, assign(socket, :back_url, back_url)}
{:ok, socket}
end
@impl true
@@ -224,12 +224,6 @@
<pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre>
</details>
<div class="mt-4">
<.back navigate={@back_url}>
{gettext("Back to records")}
</.back>
</div>
<.modal
:if={@live_action == :edit}
id="record-modal"
@@ -5,15 +5,6 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
@impl true
def mount(_params, _session, socket) do
back_url =
if connected?(socket) do
socket
|> get_connect_params()
|> Map.get("_live_referer", ~p"/wishlist")
else
~p"/wishlist"
end
socket =
if static_changed?(socket) do
put_flash(socket, :warning, gettext("The application has been updated, please reload."))
@@ -21,7 +12,7 @@ defmodule MusicLibraryWeb.WishlistLive.Show do
socket
end
{:ok, assign(socket, :back_url, back_url)}
{:ok, socket}
end
@impl true
@@ -234,12 +234,6 @@
<pre><code class="text-xs sm:text-sm"><%= Jason.encode!(@record.musicbrainz_data, pretty: true) %></code></pre>
</details>
<div class="mt-4">
<.back navigate={@back_url}>
{gettext("Back to wishlist")}
</.back>
</div>
<.modal
:if={@live_action == :edit}
id="record-modal"