mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
forgot initialization
This commit is contained in:
@@ -248,6 +248,18 @@ const PostFormTable = ({ closeForm, postCid }: { closeForm: () => void; postCid:
|
||||
}
|
||||
};
|
||||
|
||||
const hasInitializedDisplayName = useRef(false);
|
||||
useEffect(() => {
|
||||
if (displayName && !hasInitializedDisplayName.current) {
|
||||
hasInitializedDisplayName.current = true;
|
||||
if (isInPostView) {
|
||||
setPublishReplyOptions({ displayName });
|
||||
} else {
|
||||
setPublishPostStore({ displayName });
|
||||
}
|
||||
}
|
||||
}, [displayName, isInPostView]);
|
||||
|
||||
return (
|
||||
<table className={styles.postFormTable}>
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user