Skip to content

Commit

Permalink
Merge pull request #251 from appwrite/fix-invalid-invite
Browse files Browse the repository at this point in the history
feat: invalid invite
  • Loading branch information
TorstenDittmann authored Feb 8, 2023
2 parents 0d1377e + bb92e93 commit b927558
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/routes/invite/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import { page } from '$app/stores';
import { onMount } from 'svelte';
import { trackEvent } from '$lib/actions/analytics';
import { Alert } from '$lib/components';
let teamId: string, membershipId: string, userId: string, secret: string;
let terms = false;
Expand Down Expand Up @@ -42,10 +43,22 @@
</svelte:head>

<Unauthenticated>
<svelte:fragment slot="title">Invite</svelte:fragment>
<svelte:fragment slot="title">
{#if !userId || !secret || !membershipId || !teamId}
Invalid invite
{:else}
Invite
{/if}
</svelte:fragment>
<svelte:fragment>
{#if !userId || !secret || !membershipId || !teamId}
<p class="text">Invalid invite link.</p>
<Alert type="warning">
<svelte:fragment slot="title">The invite link is not valid</svelte:fragment>
Please ask the project owner to send you a new invite.
</Alert>
<div class="u-flex u-main-end u-margin-block-start-40 ">
<Button href={`${base}/register`}>Sign up to Appwrite</Button>
</div>
{:else}
<p class="text">You have been invited to join a team project on Appwrite</p>
<Form on:submit={acceptInvite}>
Expand Down

1 comment on commit b927558

@vercel
Copy link

@vercel vercel bot commented on b927558 Feb 8, 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.