diff --git a/components/switch-account.js b/components/switch-account.js index af8808f4..cb7563b9 100644 --- a/components/switch-account.js +++ b/components/switch-account.js @@ -79,7 +79,9 @@ const AccountListRow = ({ account, ...props }) => { } ) - const onClick = async () => { + const onClick = async (e) => { + // prevent navigation + e.preventDefault() document.cookie = `multi_auth.user-id=${anonRow ? 'anonymous' : account.id}; Path=/; Secure` if (anonRow) { // order is important to prevent flashes of no session @@ -94,8 +96,7 @@ const AccountListRow = ({ account, ...props }) => { // can't show hat since we don't have access to the streak from the data available in the cookies return (