Adrien Béraud | ab519ff | 2022-05-03 15:34:48 -0400 | [diff] [blame] | 1 | import { Box, Card, CardContent, Typography } from '@mui/material'; |
Adrien Béraud | 6ecaa40 | 2021-04-06 17:37:25 -0400 | [diff] [blame] | 2 | |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 3 | export default function JamiIdCard(props) { |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 4 | const account = props.account; |
| 5 | const registeredName = account.getRegisteredName(); |
| 6 | return ( |
| 7 | <Card style={{ marginBottom: 16 }}> |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 8 | <CardContent> |
| 9 | <Box> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 10 | <Typography color="textSecondary">Jami ID</Typography> |
| 11 | <Typography variant="h5" component="h2" gutterBottom noWrap> |
| 12 | {account.getUri()} |
| 13 | </Typography> |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 14 | </Box> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 15 | {registeredName && ( |
| 16 | <Box> |
| 17 | <Typography color="textSecondary">Jami username</Typography> |
| 18 | <Typography variant="h5" component="h2" noWrap> |
| 19 | {registeredName} |
| 20 | </Typography> |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 21 | </Box> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 22 | )} |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 23 | </CardContent> |
| 24 | </Card> |
simon | d47ef9e | 2022-09-28 22:24:28 -0400 | [diff] [blame^] | 25 | ); |
Adrien Béraud | 150b478 | 2021-04-21 19:40:59 -0400 | [diff] [blame] | 26 | } |