From 9a29c330a4ad767bb4a046e9a861e71e175f223c Mon Sep 17 00:00:00 2001
From: Vinicius Gabriel Machado <vgm18@inf.ufpr.br>
Date: Sun, 16 May 2021 03:23:28 -0300
Subject: [PATCH] just commiting one thing that i used in tests and forgot to
 remove, just in case this version goes live

---
 src/Components/MenuList.js         | 3 ---
 src/Components/MobileDrawerMenu.js | 4 +---
 2 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/Components/MenuList.js b/src/Components/MenuList.js
index bed81e11..65ab3c6b 100644
--- a/src/Components/MenuList.js
+++ b/src/Components/MenuList.js
@@ -28,7 +28,6 @@ import Profile from '../img/default_profile0.png'
 import styled from 'styled-components'
 import {apiDomain} from '../env.js'
 import {deleteRequest} from './HelperFunctions/getAxiosConfig'
-import { useHistory } from 'react-router-dom'
 
 
 const OverrideButton = styled(Button)`
@@ -53,11 +52,9 @@ export default function MenuList(props) {
           userLoggedOut: !state.userIsLoggedIn,
       })
   }
-  let history = useHistory()
   const handleLogout = () => {
       const url = `/auth/sign_out`
       deleteRequest(url, handleSuccessSignOut, (error) => {console.log(error)})
-      history.push("/")
   }
 
   return (
diff --git a/src/Components/MobileDrawerMenu.js b/src/Components/MobileDrawerMenu.js
index 12fec2ad..469fa378 100644
--- a/src/Components/MobileDrawerMenu.js
+++ b/src/Components/MobileDrawerMenu.js
@@ -20,7 +20,7 @@ import React, { useContext } from 'react'
 import { Store } from '../Store';
 import Drawer from '@material-ui/core/Drawer';
 import styled from 'styled-components'
-import { Link, useHistory } from 'react-router-dom'
+import { Link } from 'react-router-dom'
 import HomeIcon from '@material-ui/icons/Home';
 import InfoIcon from '@material-ui/icons/Info';
 import MailOutlineIcon from '@material-ui/icons/MailOutline';
@@ -102,11 +102,9 @@ export default function MobileDrawerMenu(props) {
             userLoggedOut: !state.userIsLoggedIn,
         })
     }
-    let history = useHistory()
     const handleLogout = () => {
         const url = `/auth/sign_out`
         deleteRequest(url, handleSuccessSignOut, (error) => { console.log(error) })
-        history.push("/")
     }
 
     return (
-- 
GitLab