mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Pass email prop from verify page to modal to render immediately
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import { logout } from '$lib/helpers/logout';
|
||||
import { browser } from '$app/environment';
|
||||
|
||||
let { show = $bindable(false) } = $props();
|
||||
let { show = $bindable(false), email: emailFromParent = null } = $props();
|
||||
let creating = $state(false);
|
||||
let emailSent = $state(false);
|
||||
let resendTimer = $state(0);
|
||||
@@ -27,6 +27,7 @@
|
||||
const EMAIL_SENT_KEY = 'email-verification-sent';
|
||||
|
||||
let cleanUrl = $derived(page.url.origin + page.url.pathname);
|
||||
const resolvedEmail = $derived(emailFromParent ?? get(user)?.email);
|
||||
|
||||
// Determine if we should show the modal
|
||||
const hasUser = $derived(!!$user);
|
||||
@@ -165,7 +166,7 @@
|
||||
will be sent to <Typography.Text
|
||||
variant="m-600"
|
||||
color="neutral-secondary"
|
||||
style="display: inline;">{get(user)?.email}</Typography.Text>
|
||||
style="display: inline;">{resolvedEmail}</Typography.Text>
|
||||
</Typography.Text>
|
||||
<Layout.Stack class="u-margin-block-start-4">
|
||||
<Layout.Stack direction="row">
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</div>
|
||||
|
||||
<!-- email verification modal -->
|
||||
<SendVerificationEmailModal bind:show={showVerificationModal} />
|
||||
<SendVerificationEmailModal bind:show={showVerificationModal} email={data.user?.email} />
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
Reference in New Issue
Block a user