Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvarelaaaa committed May 28, 2020
1 parent ba2e644 commit e4fae3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/components/BurgerMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function BurgerMenu() {
setMenuOpen(false);
};

const logoutCallback = () => {
const logoutAndClose = () => {
closeMenu();
logout();
};
Expand Down Expand Up @@ -49,7 +49,7 @@ export default function BurgerMenu() {
) : null}

{userAddress !== "none" ? (
<NavLink onClick={() => logoutCallback()} to={"/"}>
<NavLink onClick={() => logoutAndClose()} to={"/"}>
LOG OUT
</NavLink>
) : null}
Expand Down
4 changes: 2 additions & 2 deletions src/views/AccountSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function UserSettings({ history }) {
}
};

const logoutCallback = history => logout(history);
const logoutAndClose = history => logout(history);

return fetchProfileErrorMessage ? (
<p className="app__error-message">
Expand Down Expand Up @@ -167,7 +167,7 @@ function UserSettings({ history }) {
color="white"
text="logout"
addStyles="account-settings__log-out-button"
onClick={logoutCallback}
onClick={logoutAndClose}
></Button>
</div>
);
Expand Down

0 comments on commit e4fae3a

Please sign in to comment.