mirror of
https://github.com/plebbit/seedit.git
synced 2026-04-19 14:49:22 -04:00
fix(account data editor): immutable fields were included in the editor
This commit is contained in:
@@ -22,13 +22,7 @@ const AccountDataEditor = () => {
|
||||
const [text, setText] = useState('');
|
||||
const [showEditor, setShowEditor] = useState(false);
|
||||
|
||||
const accountJson = useMemo(
|
||||
() =>
|
||||
stringify({
|
||||
account: { ...account },
|
||||
}),
|
||||
[account],
|
||||
);
|
||||
const accountJson = useMemo(() => stringify({ account: { ...account, plebbit: undefined, karma: undefined, unreadNotificationCount: undefined } }), [account]);
|
||||
|
||||
useEffect(() => {
|
||||
setText(accountJson);
|
||||
|
||||
Reference in New Issue
Block a user