merge fixes

This commit is contained in:
tejusk2 2022-08-02 17:47:40 -05:00
commit 0524e157c1
5 changed files with 7 additions and 7 deletions

View file

@ -1,12 +1,12 @@
import { Button, ButtonGroup, ListItem, ListItemText, Tooltip } from '@mui/material';
import CheckIcon from '@mui/icons-material/Check';
import ReactMarkdown from 'react-markdown';
import CreationInfoTag from 'components/CreationInfoTag';
import { useUser } from 'contexts';
import { AnswerCommentsList, CommentControl, VoteControl } from 'controllers/QAControllers';
import { getAnswerVote, updateAcceptAnswer, updateAnswerVote, updateQuestion } from 'services/questionsServices';
import { useQuestion } from 'contexts';
import { postQuestionComment } from 'services/questionsServices';
import { postQuestionComment, postAnswerComment } from 'services/questionsServices';
export default function Answer({
accepted,
answer_id,

View file

@ -9,7 +9,7 @@ export default function CommentControl({
postComment,
show,
toggleShow,
canComment
}) {

View file

@ -11,10 +11,10 @@ export default function CreateAnswer({
return (
<div>
<Tooltip title={canAnswer ? '' : 'You need to be authenticated to answer or level 5 if the question is protected'}>
<Tooltip title={!canAnswer ? '' : 'You need to be authenticated to answer or level 5 if the question is protected'}>
<span>
<Button
disabled={!canAnswer}
disabled={canAnswer}
variant='contained'
onClick={toggleShow}
>

View file

@ -15,7 +15,7 @@ import { getQuestionVote, postQuestionComment,openQuestion,protectQuestion , upd
import { Link } from 'react-router-dom';
import { useEffect, useState } from 'react';
import { useQuestion, useUser } from 'contexts';
import CreateAnswer from 'components/CreateAnswer';
import CreateAnswer from './CreateAnswer';
const statusColor = (status) => {
switch (status) {
case 'open':

View file

@ -11,7 +11,7 @@ export default function AskFormController() {
const askQuestion = async (fields) => {
const { status } = await postQuestion(fields);
if (success) {
if (status === "success") {
navigate('../');
}
}