Skip to content

Commit 4fe2bb0

Browse files
committed
Fixed Logout Bug
1 parent b374a0d commit 4fe2bb0

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

client/src/components/login/Logout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export const Logout = () => {
1313

1414
const logoutFromBrowser = (context) => {
1515
localStorage.clear();
16-
// context.handleLogout()
16+
context.handleLogout()
1717
}

client/src/context.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ export class AuthProvider extends Component{
2828
}
2929

3030

31-
handleLogout = (e)=>{
32-
e.preventDefault();
31+
handleLogout = ()=>{
3332
this.setState({isAuth:false})
3433
localStorage.clear()
3534
fetch('/api/logout',{

0 commit comments

Comments
 (0)