<script>
  import { copy } from 'svelte-copy';

  let { id } = $props();
  let inviteUrl = $derived(new URL(`/invite/${id}`, document.location));
</script>

<button use:copy={inviteUrl}>copy</button>
<span>{inviteUrl}</span>
