diff --git a/frontend/src/components/SessionInfo/index.js b/frontend/src/components/SessionInfo/index.js deleted file mode 100644 index bb048cc..0000000 --- a/frontend/src/components/SessionInfo/index.js +++ /dev/null @@ -1,49 +0,0 @@ -import React from "react"; -import Typography from "@material-ui/core/Typography"; -import Button from "@material-ui/core/Button"; -import { format, parseISO } from "date-fns"; -import { toast } from "react-toastify"; - -import { i18n } from "../../translate/i18n"; -import api from "../../services/api"; - -const SessionInfo = ({ session }) => { - const handleDisconectSession = async () => { - try { - await api.put(`/whatsapp/session/${session.id}`); - } catch (err) { - console.log(err); - if (err.response && err.response.data && err.response.data.error) { - toast.error(err.response.data.error); - } - } - }; - - return ( - <> - - {`${i18n.t("sessionInfo.status")} ${session.status}`} - - - {`${i18n.t("sessionInfo.updatedAt")}`}{" "} - {session.updatedAt && - format(parseISO(session.updatedAt), "dd/MM/yy HH:mm")} - - - {/* - {`${i18n.t("sessionInfo.battery")}${session.battery}%`} - - - {`${i18n.t("sessionInfo.charging")}${session.plugged} `} - */} - - ); -}; - -export default SessionInfo;