Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
kahummer committed Sep 13, 2024
1 parent 2024593 commit 0d19829
Showing 1 changed file with 10 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,16 @@ export const UserDetails = (props: UserDetailProps) => {

const { id, firstName, lastName, username, email, emailVerified, enabled, attributes } = user;

const userDetails =
attributes?.phoneNumber && attributes?.nationalId
? {
[t('Id')]: id,
[t('First Name')]: firstName,
[t('Last Name')]: lastName,
[t('National ID')]: attributes?.nationalId,
[t('Phone Number')]: attributes?.phoneNumber,
[t('Username')]: username,
[t('Email')]: email,
[t('Verified')]: emailVerified ? t('True') : t('False'),
}
: {
[t('Id')]: id,
[t('First Name')]: firstName,
[t('Last Name')]: lastName,
[t('Username')]: username,
[t('Email')]: email,
[t('Verified')]: emailVerified ? t('True') : t('False'),
};
const userDetails = {
[t('Id')]: id,
[t('First Name')]: firstName,
[t('Last Name')]: lastName,
...(attributes?.nationalId ? { [t('National ID')]: attributes.nationalId } : {}),
...(attributes?.phoneNumber ? { [t('Phone Number')]: attributes.phoneNumber } : {}),
[t('Username')]: username,
[t('Email')]: email,
[t('Verified')]: emailVerified ? t('True') : t('False'),
};
const attributesArray = Object.entries(attributes ?? {});
const breadCrumbProps = {
items: [
Expand Down

0 comments on commit 0d19829

Please sign in to comment.