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