Skip to content

Commit

Permalink
feat: add decline button to invite page
Browse files Browse the repository at this point in the history
  • Loading branch information
agazso committed Sep 22, 2023
1 parent f9ed7a1 commit 17a271d
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/routes/invite/[address]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import Checkmark from '$lib/components/icons/checkmark.svelte'
import Events from '$lib/components/icons/events.svelte'
import CopyLink from '$lib/components/icons/copy-link.svelte'
import Close from '$lib/components/icons/close.svelte'
import Button from '$lib/components/button.svelte'
import Container from '$lib/components/container.svelte'
Expand Down Expand Up @@ -109,6 +110,10 @@
goto(routes.CHAT(chatId))
}
async function decline() {
goto(routes.HOME)
}
onMount(() => {
// when you show your QR code and link to someone, start looking for changes in the contacts
// and if a new contact is detected, redirect to their chat page
Expand Down Expand Up @@ -203,10 +208,16 @@
Connect with {counterParty?.name ?? $page.params.address} and start a private chat on Waku
chats
</p>
<Button on:click={() => startChat(wallet.address)}>
<CopyLink />
Start new chat
</Button>
<Container direction="row" justify="center" gap={12} alignItems="center" padY={0}>
<Button variant="strong" on:click={() => startChat(wallet.address)}>
<CopyLink />
Start new chat
</Button>
<Button on:click={() => decline()}>
<Close />
Decline
</Button>
</Container>
</Container>
{/if}
</AuthenticatedOnly>
Expand Down

0 comments on commit 17a271d

Please sign in to comment.