Skip to content

Commit

Permalink
fix(client): send 'yes' or 'no' as feedback value for boolean question
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Oct 30, 2024
1 parent 971a478 commit 48cdd07
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions apps/client/src/components/QuestionCard/YN/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export const YNQuestionCard: FC<Question> = ({
const { data: { no, yes } } = useQuestionStats({ questionId })
const { sendFeedback, isSending, errors } = useSendFeedback({ groupId, questionId })

console.log({ yes, no })
if (errors.length > 0)
return errors.map(({ message, type }) => <p key={message} className='text-red -text-sm'>{`${type}: ${message}`}</p>)
return (
Expand All @@ -37,7 +38,7 @@ export const YNQuestionCard: FC<Question> = ({
className='mr-2'
type='button'
onClick={() => {
sendFeedback('true')
sendFeedback('yes')
}}
disabled={isSending}
>
Expand All @@ -47,7 +48,7 @@ export const YNQuestionCard: FC<Question> = ({
type='button'
disabled={isSending}
onClick={() => {
sendFeedback('false')
sendFeedback('no')
}}
>
{no} <ThumbsDown className='inline-block' size={20} />
Expand Down

0 comments on commit 48cdd07

Please sign in to comment.