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>
|
||||
|
||||
@@ -222,6 +222,14 @@ const ReplyModal = ({ closeModal, showReplyModal, parentCid, postCid, scrollY, s
|
||||
}
|
||||
};
|
||||
|
||||
const hasInitializedDisplayName = useRef(false);
|
||||
useEffect(() => {
|
||||
if (displayName && !hasInitializedDisplayName.current) {
|
||||
hasInitializedDisplayName.current = true;
|
||||
setPublishReplyOptions({ displayName });
|
||||
}
|
||||
}, [displayName]);
|
||||
|
||||
const modalContent = (
|
||||
<div className={styles.container} ref={nodeRef}>
|
||||
<div className={`replyModalHandle ${styles.title}`}>
|
||||
|
||||
Reference in New Issue
Block a user