Skip to content
Snippets Groups Projects
Commit 9a29c330 authored by vgm18's avatar vgm18
Browse files

just commiting one thing that i used in tests and forgot to remove, just in...

just commiting one thing that i used in tests and forgot to remove, just in case this version goes live
parent 6616b2aa
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!55fixed anchor bug and added a logic to scroll to the top when user enters in...,!52bug fixing
......@@ -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 (
......
......@@ -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 (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment