From 54e779366806972f7b035da57d12f7dc6a972ee4 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Fri, 14 Mar 2025 22:01:53 -0500 Subject: [PATCH] Fix missing rename to nextAccount --- components/account.js | 6 +++--- components/nav/common.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/components/account.js b/components/account.js index 74f59261..f69cfb3d 100644 --- a/components/account.js +++ b/components/account.js @@ -50,7 +50,7 @@ export const AccountProvider = ({ children }) => { setAccounts(accounts => accounts.filter(({ id }) => id !== userId)) }, []) - const multiAuthSignout = useCallback(async () => { + const nextAccount = useCallback(async () => { const { status } = await fetch('/api/next-account', { credentials: 'include' }) // if status is 302, this means the server was able to switch us to the next available account // and the current account was simply removed from the list of available accounts including the corresponding JWT. @@ -66,8 +66,8 @@ export const AccountProvider = ({ children }) => { }, []) const value = useMemo( - () => ({ accounts, addAccount, removeAccount, meAnon, setMeAnon, multiAuthSignout }), - [accounts, addAccount, removeAccount, meAnon, setMeAnon, multiAuthSignout]) + () => ({ accounts, addAccount, removeAccount, meAnon, setMeAnon, nextAccount }), + [accounts, addAccount, removeAccount, meAnon, setMeAnon, nextAccount]) return {children} } diff --git a/components/nav/common.js b/components/nav/common.js index 7f0fc32f..e1aa9e02 100644 --- a/components/nav/common.js +++ b/components/nav/common.js @@ -269,7 +269,7 @@ export default function LoginButton () { function LogoutObstacle ({ onClose }) { const { registration: swRegistration, togglePushSubscription } = useServiceWorker() const { removeLocalWallets } = useWallets() - const { multiAuthSignout } = useAccounts() + const { nextAccount } = useAccounts() const router = useRouter() return ( @@ -285,9 +285,9 @@ function LogoutObstacle ({ onClose }) {