mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix import stringified account json
This commit is contained in:
@@ -28,7 +28,12 @@ const SettingsModal = ({ isOpen, closeModal }) => {
|
||||
|
||||
const account = useAccount();
|
||||
const { accounts } = useAccounts();
|
||||
const accountJson = useMemo(() => stringify({...account}), [account])
|
||||
|
||||
const accountJson = useMemo(() => {
|
||||
const { plebbit, ...restOfAccount } = account;
|
||||
return stringify({ account: restOfAccount });
|
||||
}, [account]);
|
||||
|
||||
const [editedAccountJson, setEditedAccountJson] = useState(accountJson);
|
||||
useEffect(() => { setEditedAccountJson(accountJson)}, [accountJson])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user