Change routes from "/records/*" to "/collection/*"
This commit is contained in:
@@ -12,7 +12,7 @@ defmodule MusicLibraryWeb.StatsLive.DataComponents do
|
||||
"relative overflow-hidden rounded-md bg-white dark:bg-zinc-800 px-4 pb-3 pt-5 shadow sm:px-6 sm:pt-6 cursor-pointer",
|
||||
@class
|
||||
]}
|
||||
phx-click={JS.navigate(~p"/records/#{@record}")}
|
||||
phx-click={JS.navigate(~p"/collection/#{@record}")}
|
||||
>
|
||||
<dt>
|
||||
<img
|
||||
@@ -29,7 +29,7 @@ defmodule MusicLibraryWeb.StatsLive.DataComponents do
|
||||
<.link
|
||||
:for={artist <- @record.artists}
|
||||
class="text-sm md:text-base lg:text-2xl text-zinc-900 hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||
patch={~p"/records?query=mbid:#{artist.musicbrainz_id}"}
|
||||
patch={~p"/collection?query=mbid:#{artist.musicbrainz_id}"}
|
||||
>
|
||||
<%= artist.name %>
|
||||
</.link>
|
||||
|
||||
@@ -8,7 +8,11 @@
|
||||
title={gettext("Latest purchase")}
|
||||
class="col-span-2 sm:col-span-3"
|
||||
/>
|
||||
<.counter title={gettext("Total collection")} count={@collection_count} path={~p"/records"} />
|
||||
<.counter
|
||||
title={gettext("Total collection")}
|
||||
count={@collection_count}
|
||||
path={~p"/collection"}
|
||||
/>
|
||||
<.counter title={gettext("Total wishlist")} count={@wishlist_count} path={~p"/wishlist"} />
|
||||
</dl>
|
||||
</div>
|
||||
@@ -28,7 +32,7 @@
|
||||
<dd class="mt-1 text-center">
|
||||
<a
|
||||
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||
href={~p"/records?query=format:#{format}"}
|
||||
href={~p"/collection?query=format:#{format}"}
|
||||
>
|
||||
<%= count %>
|
||||
</a>
|
||||
@@ -52,7 +56,7 @@
|
||||
<dd class="mt-1 text-center">
|
||||
<a
|
||||
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||
href={~p"/records?query=type:#{type}"}
|
||||
href={~p"/collection?query=type:#{type}"}
|
||||
>
|
||||
<%= count %>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user