fix refresh on add answer/comment

This commit is contained in:
“spicecat” 2022-08-18 10:12:13 -04:00
commit 826d09277c
3 changed files with 4 additions and 4 deletions

View file

@ -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({

View file

@ -17,7 +17,8 @@ export default function CommentControlController({ postComment, canComment }) {
await postComment(data);
toggleShow();
navigate('');
// navigate('');
window.location.reload(false);
};
return CommentControl({

View file

@ -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;
};