Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,16 @@
.forProject(page.params.region, page.params.project)
.users.updateEmailVerification($user.$id, !$user.emailVerification);
await invalidate(Dependencies.USER);

const hasName = $user.name && $user.name.trim() !== '';
const isVerified = !$user.emailVerification;

const message = hasName
? `The email for ${$user.name} has been ${isVerified ? 'verified' : 'no longer verified'}`
: `The email has been ${isVerified ? 'verified' : 'no longer verified'}`;

addNotification({
message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${
!$user.emailVerification ? 'unverified' : 'verified'
}`,
message,
type: 'success'
});
trackEvent(Submit.UserUpdateVerificationEmail);
Expand All @@ -44,10 +50,16 @@
.forProject(page.params.region, page.params.project)
.users.updatePhoneVerification($user.$id, !$user.phoneVerification);
await invalidate(Dependencies.USER);

const hasName = $user.name && $user.name.trim() !== '';
const isVerified = !$user.phoneVerification;

const message = hasName
? `The phone for ${$user.name} has been ${isVerified ? 'verified' : 'no longer verified'}`
: `The phone has been ${isVerified ? 'verified' : 'no longer verified'}`;

addNotification({
message: `${$user.name || $user.email || $user.phone || 'The account'} has been ${
$user.phoneVerification ? 'unverified' : 'verified'
}`,
message,
type: 'success'
});
trackEvent(Submit.UserUpdateVerificationPhone);
Expand Down
Loading