fix refresh on add answer/comment
This commit is contained in:
parent
c09dd06897
commit
826d09277c
3 changed files with 4 additions and 4 deletions
|
|
@ -19,7 +19,8 @@ export default function AnswerFormController({ toggleShow }) {
|
|||
const answerQuestion = async (fields) => {
|
||||
await postAnswer(question_id, { creator: username, text: fields.text });
|
||||
toggleShow();
|
||||
navigate('');
|
||||
// navigate('');
|
||||
window.location.reload(false);
|
||||
};
|
||||
|
||||
return Form({
|
||||
|
|
|
|||
|
|
@ -17,7 +17,8 @@ export default function CommentControlController({ postComment, canComment }) {
|
|||
await postComment(data);
|
||||
|
||||
toggleShow();
|
||||
navigate('');
|
||||
// navigate('');
|
||||
window.location.reload(false);
|
||||
};
|
||||
|
||||
return CommentControl({
|
||||
|
|
|
|||
|
|
@ -77,8 +77,6 @@ export default function QuestionController() {
|
|||
const updateVote = (data) => updateQuestionVote(question_id, data);
|
||||
const postComment = async (data) => {
|
||||
const { comment } = await postQuestionComment(question_id, data);
|
||||
|
||||
navigate('');
|
||||
return comment;
|
||||
};
|
||||
|
||||
|
|
|
|||
Reference in a new issue