Update the add_button to add_button_link and remove the extra links.

This commit is contained in:
2025-04-27 15:43:14 +03:00
parent ebbee7f9a5
commit ca1c9c05d2
5 changed files with 28 additions and 19 deletions
@@ -12,11 +12,9 @@ defmodule DecentralisedBookIndexWeb.AuthorLive.Show do
<:actions>
<%= if @current_user != nil and Role.can_moderate?(@current_user.role) do %>
<div class="flex flex-row gap-2">
<.link patch={~p"/authors/#{@author}/new"}>
<.add_button>
Alias
</.add_button>
</.link>
<.add_button_link patch={~p"/authors/#{@author}/new"}>
Alias
</.add_button_link>
<.link patch={~p"/authors/#{@author}/edit"}>
<.edit_button>
Edit
@@ -169,10 +169,9 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
</tbody>
</table>
<.add_button phx-click="add-bid" phx-target={@myself} class="w-44">
<.add_button_link phx-click="add-bid" phx-target={@myself} class="w-44">
Add Book Id
</.add_button>
</.add_button_link>
"""
end
@@ -260,9 +259,9 @@ defmodule DecentralisedBookIndexWeb.BookLive.FormComponent do
</tbody>
</table>
<.add_button phx-click="add-author-role" phx-target={@myself} class="w-40">
<.add_button_link phx-click="add-author-role" phx-target={@myself} class="w-40">
Add Author
</.add_button>
</.add_button_link>
"""
end
@@ -16,11 +16,9 @@ defmodule DecentralisedBookIndexWeb.BookLive.Show do
<:actions>
<%= if @current_user != nil and Role.can_moderate?(@current_user.role) do %>
<div class="flex flex-row gap-2">
<.link patch={~p"/books/#{@book}/new"}>
<.add_button>
Edition
</.add_button>
</.link>
<.add_button_link patch={~p"/books/#{@book}/new"}>
Edition
</.add_button_link>
<.link patch={~p"/books/#{@book}/edit"}>
<.edit_button>
Edit