conditionally rendering the user name and email in user settings page

Signed-off-by: AmbrishRamachandiran <ambrish.r@infosys.com>
This commit is contained in:
AmbrishRamachandiran
2024-02-06 12:19:15 +05:30
parent 39812987d1
commit d5b14a0ad5
2 changed files with 19 additions and 10 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-user-settings': patch
---
conditionally rendering the user name and email in user settings page
@@ -101,16 +101,20 @@ export const ProviderSettingsItem = (props: {
<Grid item xs={12} sm container>
<Grid item xs container direction="column" spacing={2}>
<Grid item xs>
<Typography
variant="subtitle1"
color="textPrimary"
gutterBottom
>
{profile.displayName}
</Typography>
<Typography variant="body2" color="textSecondary">
{profile.email}
</Typography>
{profile.displayName && (
<Typography
variant="subtitle1"
color="textPrimary"
gutterBottom
>
{profile.displayName}
</Typography>
)}
{profile.email && (
<Typography variant="body2" color="textSecondary">
{profile.email}
</Typography>
)}
<Typography variant="body2" color="textSecondary">
{description}
</Typography>