mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 03:39:29 +00:00
Feat: show some session details in frontend
This commit is contained in:
@@ -5,29 +5,25 @@ import Typography from "@material-ui/core/Typography";
|
||||
|
||||
const useStyles = makeStyles({
|
||||
main: {
|
||||
flex: 1,
|
||||
// flex: 1,
|
||||
},
|
||||
});
|
||||
|
||||
const SessionInfo = ({ session }) => {
|
||||
console.log(session);
|
||||
const classes = useStyles();
|
||||
return (
|
||||
<React.Fragment>
|
||||
<div>
|
||||
<Typography component="h2" variant="h6" color="primary" gutterBottom>
|
||||
Bateria
|
||||
{`Status: ${session.status}`}
|
||||
</Typography>
|
||||
<Typography component="p" variant="h6">
|
||||
{(session && session.baterry) || "Não disponível"}
|
||||
{`Bateria: ${session.battery}%`}
|
||||
</Typography>
|
||||
<Typography color="textSecondary" className={classes.main}>
|
||||
Carregando: {(session && session.plugged) || "Não disponível"}
|
||||
<Typography color="textSecondary">
|
||||
{`Carregando: ${session.plugged} `}
|
||||
</Typography>
|
||||
<div>
|
||||
<Link color="primary" href="#">
|
||||
Verificar bateria
|
||||
</Link>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -86,9 +86,9 @@ const WhatsAuth = () => {
|
||||
</Paper>
|
||||
</Grid>
|
||||
) : (
|
||||
<Grid item xs={6}>
|
||||
<Grid item xs={12}>
|
||||
<Paper className={classes.paper}>
|
||||
<SessionInfo sessio={session} />
|
||||
<SessionInfo session={session} />
|
||||
</Paper>
|
||||
</Grid>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user