mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-20 04:39:20 +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({
|
const useStyles = makeStyles({
|
||||||
main: {
|
main: {
|
||||||
flex: 1,
|
// flex: 1,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const SessionInfo = ({ session }) => {
|
const SessionInfo = ({ session }) => {
|
||||||
|
console.log(session);
|
||||||
const classes = useStyles();
|
const classes = useStyles();
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<div>
|
||||||
<Typography component="h2" variant="h6" color="primary" gutterBottom>
|
<Typography component="h2" variant="h6" color="primary" gutterBottom>
|
||||||
Bateria
|
{`Status: ${session.status}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography component="p" variant="h6">
|
<Typography component="p" variant="h6">
|
||||||
{(session && session.baterry) || "Não disponível"}
|
{`Bateria: ${session.battery}%`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography color="textSecondary" className={classes.main}>
|
<Typography color="textSecondary">
|
||||||
Carregando: {(session && session.plugged) || "Não disponível"}
|
{`Carregando: ${session.plugged} `}
|
||||||
</Typography>
|
</Typography>
|
||||||
<div>
|
</div>
|
||||||
<Link color="primary" href="#">
|
|
||||||
Verificar bateria
|
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
</React.Fragment>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -86,9 +86,9 @@ const WhatsAuth = () => {
|
|||||||
</Paper>
|
</Paper>
|
||||||
</Grid>
|
</Grid>
|
||||||
) : (
|
) : (
|
||||||
<Grid item xs={6}>
|
<Grid item xs={12}>
|
||||||
<Paper className={classes.paper}>
|
<Paper className={classes.paper}>
|
||||||
<SessionInfo sessio={session} />
|
<SessionInfo session={session} />
|
||||||
</Paper>
|
</Paper>
|
||||||
</Grid>
|
</Grid>
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user