labhackercd/linguagem-simples-front

View on GitHub
src/components/LogoutButton/handleLogout.js

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import axiosInstance from '../../auth/axiosApi'

export default function handleLogout() {
    try {
        localStorage.removeItem('access_token');
        localStorage.removeItem('refresh_token');
        axiosInstance.defaults.headers['Authorization'] = null;
    }
    catch (e) {
        //console.log(e);
    }
};