Skip to content

Commit

Permalink
fix: show GBR for default login.
Browse files Browse the repository at this point in the history
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
  • Loading branch information
Krishna2323 committed Oct 25, 2024
1 parent eb9c7db commit 42daf68
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/pages/settings/Profile/Contacts/ContactMethodsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) {
const [isNoDelegateAccessMenuVisible, setIsNoDelegateAccessMenuVisible] = useState(false);
const {delegatorEmail} = useDelegateUserDetails();

const filteredLoginNames = loginNames.filter((loginName) => {
const login = loginList?.[loginName];
return login?.partnerUserID === session?.email;
});

// Sort the login names by placing the one corresponding to the default contact method as the first item before displaying the contact methods.
// The default contact method is determined by checking against the session email (the current login).
const sortedLoginNames = loginNames.sort((loginName) => (loginList?.[loginName].partnerUserID === session?.email ? -1 : 1));
Expand All @@ -67,7 +62,7 @@ function ContactMethodsPage({route}: ContactMethodsPageProps) {
indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR;
} else if (!login?.validatedDate && !isDefaultContactMethod) {
indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
} else if (!login?.validatedDate && isDefaultContactMethod && filteredLoginNames.length > 1) {
} else if (!login?.validatedDate && isDefaultContactMethod && loginNames.length > 1) {
indicator = CONST.BRICK_ROAD_INDICATOR_STATUS.INFO;
}

Expand Down

0 comments on commit 42daf68

Please sign in to comment.