diff options
| -rw-r--r-- | ui/lib/components/Invite.svelte | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/lib/components/Invite.svelte b/ui/lib/components/Invite.svelte index ce45930..9e6e469 100644 --- a/ui/lib/components/Invite.svelte +++ b/ui/lib/components/Invite.svelte @@ -3,7 +3,11 @@ let { id } = $props(); let inviteUrl = $derived(new URL(`/invite/${id}`, document.location)); + // Nota bene: we cannot use:copy={inviteUrl}, because inviteUrl is not a + // string, and therefore will get treated as an options object. So we must + // explicitly build an options object, containing the value that will + // eventually be interpreted as a string. </script> -<button use:copy={inviteUrl}>copy</button> +<button use:copy={{ text: inviteUrl }}>copy</button> <span>{inviteUrl}</span> |
