swap copy to clipboard handlers

This commit is contained in:
shibao 2022-02-18 17:43:22 -05:00
parent 736cd3ab57
commit 290b4b791d

View File

@ -24,12 +24,11 @@
<%= for invite <- @invites do %> <%= for invite <- @invites do %>
<.invite_card invite={invite}> <.invite_card invite={invite}>
<:code_actions> <:code_actions>
<form phx-submit={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}> <form phx-submit="copy_to_clipboard">
<button <button
type="submit" type="submit"
class="mx-2 my-1 btn btn-primary" class="mx-2 my-1 btn btn-primary"
phx-click="copy_to_clipboard" phx-click={JS.dispatch("cannery:clipcopy", to: "#code-#{invite.id}")}
phx-value-invite_id={"#code-#{invite.id}"}
> >
<%= dgettext("actions", "Copy to clipboard") %> <%= dgettext("actions", "Copy to clipboard") %>
</button> </button>