Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#166057923 Add logout functionalities #32

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat(logout): rebase develop
  • Loading branch information
mcaleb808 committed May 17, 2019
commit 31fcb5c30b3b075f7b4e09aa127c14099f24e583
2 changes: 1 addition & 1 deletion src/__tests__/components/NavBar.test.js
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ describe('<NavBar />', () => {
describe('Logout`', () => {
test('mocks and calls window.location.reload', () => {
global.window = Object.create(window);
const url = '/auth';
const url = '/';
Object.defineProperty(window, 'location', {
value: {
href: url,
2 changes: 1 addition & 1 deletion src/components/NavBar/NavBar.jsx
Original file line number Diff line number Diff line change
@@ -32,7 +32,7 @@ export class NavBar extends Component {

onLogout = () => {
localStorage.removeItem('token');
window.location.href = '/auth';
window.location.href = '/';
};

renderLinks = (parentClass) => {