[_]: fetch fresh email verification status and update referral reward amount#1894
[_]: fetch fresh email verification status and update referral reward amount#1894
Conversation
…d amount - Fetch emailVerified from API in openPanel to avoid stale local state - Close Cello panel when email is not verified to prevent modal overlap - Remove cello-launcher attribute from AccountPopover to avoid SDK auto-open - Fix Cello notification dot causing layout shift via CSS absolute positioning - Update referral reward amount from €1,000 to €100 across all locales
Deploying drive-web with
|
| Latest commit: |
6a289d2
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://417228e2.drive-web.pages.dev |
| Branch Preview URL: | https://feature-cello-email-blocker.drive-web.pages.dev |
| const fetchEmailVerifiedStatus = async (fallback: boolean): Promise<boolean> => { | ||
| try { | ||
| const usersClient = SdkFactory.getNewApiInstance().createUsersClient(); | ||
| const { user } = await usersClient.refreshUser(); | ||
| return user.emailVerified; | ||
| } catch { | ||
| return fallback; | ||
| } | ||
| }; |
There was a problem hiding this comment.
I think taht it is not necessary to do the fetch if user.emailVerified is already true
src/services/referral.service.ts
Outdated
| text: 'Verify your email to be elegible to referrals. Check your inbox or', | ||
| type: ToastType.Info, | ||
| duration: Infinity, | ||
| containerClassName: 'w-100 border-primary/30 bg-primary/5 dark:bg-primary/10', | ||
| action: { | ||
| text: 'resend verification', |
There was a problem hiding this comment.
Rembember to add the text to translations file :)
| }, | ||
| }); | ||
| if (globalThis.Cello) { | ||
| await globalThis.Cello('close'); |
There was a problem hiding this comment.
Is this a call to the Cello API? It might be a good idea to encapsulate it so that it doesn’t look so odd and is easier to maintain (in another task)
…ication check - replace hardcoded referral verification toast text with i18n keys - add email verification message/action translations to all supported locales - skip API verification lookup when user is already marked as verified - remove explicit infinite toast duration to use default notification behavior
|
| "emailVerification": { | ||
| "message": "Verifica tu correo electrónico para ser elegible para referidos. Revisa tu bandeja de entrada o", | ||
| "resendVerification": "reenviar verificación" |
There was a problem hiding this comment.
I think something’s missing here "Revisa tu bandeja de entrada o" or what? :O
It might work in English, but in other languages it sounds a bit robotic, like in Spanish
There was a problem hiding this comment.
That is aligned with the design provided by the product team



Description
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes