Skip to content

Commit

Permalink
feat: add decline button to invite page (#436)
Browse files Browse the repository at this point in the history
  • Loading branch information
agazso authored Sep 22, 2023
1 parent f9ed7a1 commit e57b412
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/routes/chat/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,11 @@
</p>
<Spacer />
<Container direction="row" justify="center" gap={12} alignItems="center" padY={0}>
<Button align="center" variant="strong" on:click={() => join()}>
<Button align="block" variant="strong" on:click={() => join()}>
<Checkmark />
Start chatting
</Button>
<Button align="left" on:click={() => decline()}>
<Button align="block" on:click={() => decline()}>
<Close />
Decline
</Button>
Expand Down
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 align="block" variant="strong" on:click={() => startChat(wallet.address)}>
<CopyLink />
Start new chat
</Button>
<Button align="block" on:click={() => decline()}>
<Close />
Decline
</Button>
</Container>
</Container>
{/if}
</AuthenticatedOnly>
Expand Down

1 comment on commit e57b412

@vercel
Copy link

@vercel vercel bot commented on e57b412 Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.