blob: 1b75bc5c568819aaf60fb8c41fe94d1789e8a8cc [file] [log] [blame]
Adrien Béraud6ecaa402021-04-06 17:37:25 -04001import React from 'react';
Adrien Béraud150b4782021-04-21 19:40:59 -04002import { Box, Card, CardContent, Typography } from '@material-ui/core';
3import { makeStyles } from '@material-ui/core/styles';
Adrien Béraud6ecaa402021-04-06 17:37:25 -04004
Adrien Béraud150b4782021-04-21 19:40:59 -04005const useStyles = makeStyles({
6 title: {
7 fontSize: 14,
8 }, pos: {
9 fontSize: 14,
Adrien Béraud6ecaa402021-04-06 17:37:25 -040010
Adrien Béraud6ecaa402021-04-06 17:37:25 -040011 }
Adrien Béraud150b4782021-04-21 19:40:59 -040012});
Adrien Béraud6ecaa402021-04-06 17:37:25 -040013
Adrien Béraud150b4782021-04-21 19:40:59 -040014export default function JamiIdCard(props) {
15 const classes = useStyles()
16 const account = props.account
17 const registeredName = account.getRegisteredName()
18 return <Card style={{marginBottom:16}}>
19 <CardContent>
20 <Box>
21 <Typography className={classes.title} color="textSecondary">
22 Jami ID
23 </Typography>
24 <Typography variant="h5" component="h2" gutterBottom noWrap>{account.getUri()}</Typography>
25 </Box>
26 {registeredName && <Box>
27 <Typography className={classes.title} color="textSecondary" >
28 Jami username
29 </Typography>
30 <Typography variant="h5" component="h2" noWrap>{registeredName}</Typography>
31 </Box>
32 }
33 </CardContent>
34 </Card>
35}