tweak
This commit is contained in:
@@ -10,10 +10,10 @@ export function useEmail() {
|
||||
const {data: serviceConfig} = useServiceConfigQuery()
|
||||
const {data: profile} = useProfileQuery({did: currentAccount?.did})
|
||||
|
||||
const checkEmailConfirmed = serviceConfig?.checkEmailConfirmed
|
||||
const checkEmailConfirmed = !!serviceConfig?.checkEmailConfirmed
|
||||
|
||||
const isNewEnough =
|
||||
profile?.createdAt &&
|
||||
!!profile?.createdAt &&
|
||||
Date.parse(profile.createdAt) >= Date.parse('2024-11-16T02:00:00.000Z')
|
||||
|
||||
const isSelfHost =
|
||||
@@ -24,7 +24,7 @@ export function useEmail() {
|
||||
const needsEmailVerification =
|
||||
!isSelfHost &&
|
||||
checkEmailConfirmed &&
|
||||
!currentAccount?.emailConfirmed &&
|
||||
!!currentAccount?.emailConfirmed &&
|
||||
isNewEnough
|
||||
|
||||
return {needsEmailVerification}
|
||||
|
||||
Reference in New Issue
Block a user