From aebb5505bd91d3497aa7b9bb887879e4d07a715b Mon Sep 17 00:00:00 2001 From: canove Date: Tue, 28 Jul 2020 11:40:41 -0300 Subject: [PATCH] Feat: show some session details in frontend --- frontend/src/components/SessionInfo/index.js | 20 ++++++++------------ frontend/src/pages/WhatsAuth/WhatsAuth.js | 4 ++-- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/frontend/src/components/SessionInfo/index.js b/frontend/src/components/SessionInfo/index.js index a749dd3..5407f78 100644 --- a/frontend/src/components/SessionInfo/index.js +++ b/frontend/src/components/SessionInfo/index.js @@ -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 ( - +
- Bateria + {`Status: ${session.status}`} - {(session && session.baterry) || "Não disponível"} + {`Bateria: ${session.battery}%`} - - Carregando: {(session && session.plugged) || "Não disponível"} + + {`Carregando: ${session.plugged} `} -
- - Verificar bateria - -
- +
); }; diff --git a/frontend/src/pages/WhatsAuth/WhatsAuth.js b/frontend/src/pages/WhatsAuth/WhatsAuth.js index 3d63eb2..997fe0f 100644 --- a/frontend/src/pages/WhatsAuth/WhatsAuth.js +++ b/frontend/src/pages/WhatsAuth/WhatsAuth.js @@ -86,9 +86,9 @@ const WhatsAuth = () => { ) : ( - + - + )}