diff --git a/client/src/components/ListQuestion.jsx b/client/src/components/ListQuestion.jsx index 3ae30a0..05dda16 100644 --- a/client/src/components/ListQuestion.jsx +++ b/client/src/components/ListQuestion.jsx @@ -20,7 +20,7 @@ export default function ListQuestion({ }) { const sm = useMediaQuery((theme) => theme.breakpoints.only('sm')); const md = useMediaQuery((theme) => theme.breakpoints.only('md')); - console.log(123123, tags) + return ( @@ -31,7 +31,7 @@ export default function ListQuestion({ - {sm || md ? null : } + {sm || md ? null : } {text.replace(/<[^>]*>?/gm, '')} - Accepted: {String(hasAcceptedAnswer)} - diff --git a/client/src/components/ListQuestionInfo.jsx b/client/src/components/ListQuestionInfo.jsx index 57c1a87..e61cc4e 100644 --- a/client/src/components/ListQuestionInfo.jsx +++ b/client/src/components/ListQuestionInfo.jsx @@ -1,16 +1,31 @@ -import { Typography } from "@mui/material" -export default function ListQuestionInfo({upvotes, downvotes, answers, views, inline}){ - return inline? ( +import { Chip, Typography } from '@mui/material'; +export default function ListQuestionInfo({ upvotes, downvotes, answers, hasAcceptedAnswer, views, inline }) { + return inline ? ( <> - {upvotes - downvotes} votes | - {answers} answers | - {views} views + {upvotes - downvotes} votes | + {answers} answers | + {views} views + + Accepted: + + ) : ( <> - {upvotes - downvotes} votes - {answers} answers - {views} views + {upvotes - downvotes} votes + {answers} answers + {views} views + + Accepted: + ) } \ No newline at end of file