diff --git a/src/components/account-sheet.jsx b/src/components/account-sheet.jsx index 78b89aba..e615b23d 100644 --- a/src/components/account-sheet.jsx +++ b/src/components/account-sheet.jsx @@ -1,6 +1,8 @@ +import { useEffect } from 'preact/hooks'; import { useHotkeys } from 'react-hotkeys-hook'; import { api } from '../utils/api'; +import states from '../utils/states'; import AccountInfo from './account-info'; @@ -10,6 +12,12 @@ function AccountSheet({ account, instance: propInstance, onClose }) { const escRef = useHotkeys('esc', onClose, [onClose]); + useEffect(() => { + if (!isString) { + states.accounts[`${account.id}@${instance}`] = account; + } + }, [account]); + return (