From cc4352ae5c9e59ec2155720a97ab362e21635fc4 Mon Sep 17 00:00:00 2001 From: GandalfGwaihir Date: Tue, 2 Apr 2024 04:46:49 +0530 Subject: [PATCH] Add unvalidated user check for timezone --- src/pages/ProfilePage.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/pages/ProfilePage.tsx b/src/pages/ProfilePage.tsx index f3c2840d5586..270b72b93da8 100755 --- a/src/pages/ProfilePage.tsx +++ b/src/pages/ProfilePage.tsx @@ -90,10 +90,12 @@ function ProfilePage({personalDetails, personalDetailsMetadata, route, session, const fallbackIcon = details?.fallbackIcon ?? ''; const login = details?.login ?? ''; const timezone = details?.timezone; + const reportRecipient = personalDetails?.[accountID]; + const isParticipantValidated = reportRecipient?.validated ?? false; // If we have a reportID param this means that we // arrived here via the ParticipantsPage and should be allowed to navigate back to it - const shouldShowLocalTime = !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) && !isEmptyObject(timezone); + const shouldShowLocalTime = !ReportUtils.hasAutomatedExpensifyAccountIDs([accountID]) && !isEmptyObject(timezone) && isParticipantValidated; let pronouns = details?.pronouns ?? ''; if (pronouns?.startsWith(CONST.PRONOUNS.PREFIX)) { const localeKey = pronouns.replace(CONST.PRONOUNS.PREFIX, '');