fix self host
This commit is contained in:
@@ -8,12 +8,15 @@ export function useEmail() {
|
|||||||
|
|
||||||
const {data: serviceConfig} = useServiceConfigQuery()
|
const {data: serviceConfig} = useServiceConfigQuery()
|
||||||
|
|
||||||
|
const checkEmailConfirmed = serviceConfig?.checkEmailConfirmed
|
||||||
|
|
||||||
const isSelfHost =
|
const isSelfHost =
|
||||||
serviceConfig?.checkEmailConfirmed &&
|
|
||||||
currentAccount &&
|
currentAccount &&
|
||||||
getHostnameFromUrl(currentAccount.service) !==
|
getHostnameFromUrl(currentAccount.service) !==
|
||||||
getHostnameFromUrl(BSKY_SERVICE)
|
getHostnameFromUrl(BSKY_SERVICE)
|
||||||
const needsEmailVerification = !isSelfHost && !currentAccount?.emailConfirmed
|
|
||||||
|
const needsEmailVerification =
|
||||||
|
!isSelfHost && checkEmailConfirmed && !currentAccount?.emailConfirmed
|
||||||
|
|
||||||
return {needsEmailVerification}
|
return {needsEmailVerification}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user