mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
Removed the unncessary toggle reply prop that was passed
no issue
This commit is contained in:
parent
c2d49d549c
commit
b2c7a49398
2 changed files with 5 additions and 5 deletions
|
@ -82,7 +82,7 @@ const Comment = (props) => {
|
|||
leaveTo="opacity-0"
|
||||
>
|
||||
<div className="ml-14 my-10">
|
||||
<Form parent={comment} toggle={toggleReplyMode} isReply={true} toggleReplyMode={toggleReplyMode} />
|
||||
<Form parent={comment} toggle={toggleReplyMode} isReply={true} />
|
||||
</div>
|
||||
</Transition>
|
||||
</>
|
||||
|
|
|
@ -87,8 +87,8 @@ const Form = (props) => {
|
|||
editor.on('blur', () => {
|
||||
if (editor?.isEmpty) {
|
||||
setFormOpen(false);
|
||||
if (props.isReply && props.toggleReplyMode) {
|
||||
props.toggleReplyMode();
|
||||
if (props.isReply && props.toggle) {
|
||||
props.toggle();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -109,7 +109,7 @@ const Form = (props) => {
|
|||
});
|
||||
})
|
||||
.run();
|
||||
}, [editor, props, props.isEdit, props.isReply, props.toggleReplyMode]);
|
||||
}, [editor, props, props.isEdit, props.isReply, props.toggle]);
|
||||
|
||||
const submitForm = async (event) => {
|
||||
event.preventDefault();
|
||||
|
@ -135,7 +135,7 @@ const Form = (props) => {
|
|||
props.toggle();
|
||||
|
||||
setFormOpen(false);
|
||||
props.toggleReplyMode();
|
||||
props.toggle();
|
||||
} catch (e) {
|
||||
// eslint-disable-next-line no-console
|
||||
console.error(e);
|
||||
|
|
Loading…
Add table
Reference in a new issue