blob: 2f54d9148af88125690e98fc46587b497bd3a6fc [file] [log] [blame]
Adrien Béraudab519ff2022-05-03 15:34:48 -04001import { Box, Card, CardContent, Typography } from '@mui/material';
Adrien Béraud6ecaa402021-04-06 17:37:25 -04002
simon6b9ddfb2022-10-03 00:04:50 -04003import Account from '../../../model/Account';
4
5type JamiIdCardProps = {
6 account: Account;
7};
8
9export default function JamiIdCard(props: JamiIdCardProps) {
simond47ef9e2022-09-28 22:24:28 -040010 const account = props.account;
11 const registeredName = account.getRegisteredName();
12 return (
13 <Card style={{ marginBottom: 16 }}>
Adrien Béraud150b4782021-04-21 19:40:59 -040014 <CardContent>
15 <Box>
simond47ef9e2022-09-28 22:24:28 -040016 <Typography color="textSecondary">Jami ID</Typography>
17 <Typography variant="h5" component="h2" gutterBottom noWrap>
18 {account.getUri()}
19 </Typography>
Adrien Béraud150b4782021-04-21 19:40:59 -040020 </Box>
simond47ef9e2022-09-28 22:24:28 -040021 {registeredName && (
22 <Box>
23 <Typography color="textSecondary">Jami username</Typography>
24 <Typography variant="h5" component="h2" noWrap>
25 {registeredName}
26 </Typography>
Adrien Béraud150b4782021-04-21 19:40:59 -040027 </Box>
simond47ef9e2022-09-28 22:24:28 -040028 )}
Adrien Béraud150b4782021-04-21 19:40:59 -040029 </CardContent>
30 </Card>
simond47ef9e2022-09-28 22:24:28 -040031 );
Adrien Béraud150b4782021-04-21 19:40:59 -040032}