chore: hide login fields if logged in user matches invite email
This commit is contained in:
@@ -179,7 +179,7 @@
|
||||
|
||||
$: isLoading = loading || $user.fetchingUser;
|
||||
$: console.log('$profile', $profile);
|
||||
$: console.log('data.invite.profile', data.invite.profile);
|
||||
$: console.log('data.invite', data.invite);
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
@@ -212,6 +212,7 @@
|
||||
inputClassName="w-full"
|
||||
isDisabled={true}
|
||||
/>
|
||||
{#if $profile?.email !== data.invite.email}
|
||||
{#if !data.invite.profile}
|
||||
<TextField
|
||||
label={$t('login.fields.full_name')}
|
||||
@@ -226,7 +227,6 @@
|
||||
isRequired
|
||||
/>
|
||||
{/if}
|
||||
{#if $profile?.email !== data.invite.email}
|
||||
<TextField
|
||||
label={$t('login.fields.password')}
|
||||
bind:value={fields.password}
|
||||
@@ -239,7 +239,6 @@
|
||||
helperMessage={$t('login.fields.password_helper_message')}
|
||||
isRequired
|
||||
/>
|
||||
{/if}
|
||||
{#if !data.invite.profile}
|
||||
<TextField
|
||||
label={$t('login.fields.confirm_password')}
|
||||
@@ -253,6 +252,7 @@
|
||||
isRequired
|
||||
/>
|
||||
{/if}
|
||||
{/if}
|
||||
{#if submitError}
|
||||
<p class="text-sm text-red-500">{submitError}</p>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user