mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Update post-form.tsx
This commit is contained in:
@@ -148,6 +148,28 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
|
||||
}
|
||||
}, [index, resetPublishPostStore, navigate]);
|
||||
|
||||
useEffect(() => {
|
||||
if (anonMode) {
|
||||
setPublishPostStore({
|
||||
signer: undefined,
|
||||
author: {
|
||||
address: undefined,
|
||||
displayName: displayName || undefined,
|
||||
},
|
||||
});
|
||||
getAnonAddressForPost();
|
||||
} else {
|
||||
setPublishPostStore({
|
||||
signer: undefined,
|
||||
author: {
|
||||
...account?.author,
|
||||
displayName: displayName || account?.author?.displayName,
|
||||
},
|
||||
});
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [anonMode]);
|
||||
|
||||
// in post page, publish a reply to the post
|
||||
const isInPostView = isPostPageView(location.pathname, params);
|
||||
const cid = params?.commentCid as string;
|
||||
|
||||
Reference in New Issue
Block a user