Skip to content

Commit

Permalink
only verify email when enter email
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenhoaidanh committed Jul 17, 2023
1 parent 69d4343 commit 141f3dc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ function NotificationPreference({
const isVerifiedEmail = userInfo?.email && inputEmail === userInfo?.email
const needVerifyEmail = inputEmail && inputEmail !== userInfo?.email

const disableCheckbox = false // needVerifyEmail || notFillEmail || hasErrorInput
const disableCheckbox = hasErrorInput
const isIncludePriceAlert = useCallback(() => {
const changedData = getDiffChangeTopics(topicGroups)
return (
Expand All @@ -313,7 +313,7 @@ function NotificationPreference({

const checkProfileAndSave = () => {
if (disableButtonSave) return
if (!userInfo?.email && !isIncludePriceAlert()) {
if (needVerifyEmail && !isIncludePriceAlert()) {
showVerifyModal()
return
}
Expand Down

0 comments on commit 141f3dc

Please sign in to comment.