Use link+navigate instead of a+href
Makes application more performant as it avoids re-establishing a connection.
This commit is contained in:
@@ -55,12 +55,12 @@ defmodule MusicLibraryWeb.StatsLive.DataComponents do
|
|||||||
</p>
|
</p>
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1">
|
<dd class="mt-1">
|
||||||
<a
|
<.link
|
||||||
href={@path}
|
navigate={@path}
|
||||||
class="block text-2xl sm:text-3xl font-semibold text-center text-zinc-900 hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
class="block text-2xl sm:text-3xl font-semibold text-center text-zinc-900 hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||||
>
|
>
|
||||||
{@count}
|
{@count}
|
||||||
</a>
|
</.link>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -32,12 +32,12 @@
|
|||||||
{Record.format_long_label(format)}
|
{Record.format_long_label(format)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-center">
|
<dd class="mt-1 text-center">
|
||||||
<a
|
<.link
|
||||||
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||||
href={~p"/collection?query=format:#{format}"}
|
navigate={~p"/collection?query=format:#{format}"}
|
||||||
>
|
>
|
||||||
{count}
|
{count}
|
||||||
</a>
|
</.link>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -57,12 +57,12 @@
|
|||||||
{Record.type_long_label(type)}
|
{Record.type_long_label(type)}
|
||||||
</dt>
|
</dt>
|
||||||
<dd class="mt-1 text-center">
|
<dd class="mt-1 text-center">
|
||||||
<a
|
<.link
|
||||||
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
class="text-xl lg:text-2xl font-semibold hover:text-zinc-500 dark:text-zinc-300 dark:hover:text-zinc-200"
|
||||||
href={~p"/collection?query=type:#{type}"}
|
navigate={~p"/collection?query=type:#{type}"}
|
||||||
>
|
>
|
||||||
{count}
|
{count}
|
||||||
</a>
|
</.link>
|
||||||
</dd>
|
</dd>
|
||||||
</div>
|
</div>
|
||||||
</dl>
|
</dl>
|
||||||
|
|||||||
Reference in New Issue
Block a user