diff options
| author | Kit La Touche <kit@transneptune.net> | 2024-11-11 23:00:29 -0500 |
|---|---|---|
| committer | Kit La Touche <kit@transneptune.net> | 2024-11-11 23:00:29 -0500 |
| commit | e1cde26d8dc7342ee002eb02d9448c54905ec67c (patch) | |
| tree | 3c7347f7a253e669f29f7a8116ab4ad9f882518a /ui/routes | |
| parent | a547bf3506b822d5ff4c1f1c6c4a15c63dd2d90e (diff) | |
| parent | a0fc6434cb1f65b558a0a94c5cdddf5d79d15206 (diff) | |
Merge branch 'main' into wip/stylize
Diffstat (limited to 'ui/routes')
| -rw-r--r-- | ui/routes/(login)/invite/[invite]/+page.svelte | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ui/routes/(login)/invite/[invite]/+page.svelte b/ui/routes/(login)/invite/[invite]/+page.svelte index 3685997..4433bd6 100644 --- a/ui/routes/(login)/invite/[invite]/+page.svelte +++ b/ui/routes/(login)/invite/[invite]/+page.svelte @@ -11,11 +11,10 @@ let pending = false; let disabled = $derived(pending); - async function onSubmit(event) { + async function onSubmit(event, inviteId) { event.preventDefault(); pending = true; - let invite = await data.invite; - const response = await acceptInvite(invite.id, username, password); + const response = await acceptInvite(inviteId, username, password); if (200 <= response.status && response.status < 300) { username = ''; password = ''; @@ -33,5 +32,5 @@ <div class="card m-4 p-4"> <p>Hi there! {invite.issuer} invites you to the conversation.</p> </div> - <LogIn {disabled} bind:username bind:password onsubmit={onSubmit} /> + <LogIn {disabled} bind:username bind:password onsubmit={(event) => onSubmit(event, invite.id)} /> {/await} |
