From cc2021767743d08d918e07b195a04c861479f390 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cspicecat=E2=80=9D?= Date: Thu, 18 Aug 2022 17:20:37 -0400 Subject: [PATCH] qa tags --- .../src/components/QAComponents/Question.jsx | 47 ++++++++++--------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/client/src/components/QAComponents/Question.jsx b/client/src/components/QAComponents/Question.jsx index 259b782..386eafe 100644 --- a/client/src/components/QAComponents/Question.jsx +++ b/client/src/components/QAComponents/Question.jsx @@ -39,6 +39,7 @@ export default function Question({ downvotes, hasAcceptedAnswer, status, + tags, title, text, upvotes, @@ -62,11 +63,11 @@ export default function Question({ const [value, setValue] = useState(75); canBounty = canBounty && !hasBounty - function handleBountyFix(){ + function handleBountyFix() { handleBounty(value) } return ( - + <> {title} @@ -92,6 +93,8 @@ export default function Question({ label={hasAcceptedAnswer ? 'yes' : 'no'} size='small' /> + Tags: {tags.join(', ')} +
- { show && - { - if (e.target.value === "") { - setValue(75); - return; + {show && + { + if (e.target.value === "") { + setValue(75); + return; + } + const value = e.target.value; + if (value > max) { + setValue(max); + } else if (value < min) { + setValue(min); + } else { + setValue(value); + } + + + }} /> } - const value = e.target.value; - if (value > max) { - setValue(max); - } else if (value < min) { - setValue(min); - } else { - setValue(value); - } - - - }}/> - } @@ -177,7 +180,7 @@ export default function Question({ {ongoingVote.users.toString()} - voting to {ongoingVote.type} this question{' '} )} - {hasBounty && ( + {hasBounty && ( there is a {hasBounty} point bounty on this question