summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2025-01-04 17:58:17 -0500
committerKit La Touche <kit@transneptune.net>2025-01-04 17:58:17 -0500
commit88f4aa4a5b0f42cd061498c9726fb4b8895ff007 (patch)
tree05c81829079a601104441fc866a1ff57883e7a21
parent699901355c37dcf0bc9f5882cb0bfeeb3297c976 (diff)
Fix invite copy button
-rw-r--r--ui/lib/components/Invite.svelte6
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>