cleaning up code
This commit is contained in:
parent
91108652d8
commit
67ca454d72
|
@ -27,16 +27,6 @@ import { CATEGORY_COLORS } from '../charts/contract/choice'
|
||||||
import { useChartAnswers } from '../charts/contract/choice'
|
import { useChartAnswers } from '../charts/contract/choice'
|
||||||
import { ChatIcon } from '@heroicons/react/outline'
|
import { ChatIcon } from '@heroicons/react/outline'
|
||||||
|
|
||||||
// TODO: get a color
|
|
||||||
// export function useAnswerColor(answer: Answer, contract:Contract) {
|
|
||||||
// const colorSortedAnswer = useChartAnswers(contract).map(
|
|
||||||
// (value, _index) => value.text
|
|
||||||
// )
|
|
||||||
// colorIndex={colorSortedAnswer.indexOf(answer.text)}
|
|
||||||
// const color =
|
|
||||||
// colorIndex != undefined ? CATEGORY_COLORS[colorIndex] : '#B1B1C7'
|
|
||||||
// }
|
|
||||||
|
|
||||||
export function AnswersPanel(props: {
|
export function AnswersPanel(props: {
|
||||||
contract: FreeResponseContract | MultipleChoiceContract
|
contract: FreeResponseContract | MultipleChoiceContract
|
||||||
onAnswerCommentClick: (answer: Answer) => void
|
onAnswerCommentClick: (answer: Answer) => void
|
||||||
|
|
|
@ -90,9 +90,7 @@ export function AnswerCommentInput(props: {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Row className="gap-2">
|
|
||||||
<CommentsAnswer answer={answerResponse} contract={contract} />
|
<CommentsAnswer answer={answerResponse} contract={contract} />
|
||||||
</Row>
|
|
||||||
<Row>
|
<Row>
|
||||||
<div className="ml-1">
|
<div className="ml-1">
|
||||||
<Curve size={28} strokeWidth={1} color="#D8D8EB" />
|
<Curve size={28} strokeWidth={1} color="#D8D8EB" />
|
||||||
|
|
|
@ -154,14 +154,17 @@ export function ParentFeedComment(props: {
|
||||||
numComments={numComments}
|
numComments={numComments}
|
||||||
onClick={onSeeReplyClick}
|
onClick={onSeeReplyClick}
|
||||||
/>
|
/>
|
||||||
<Row className="my-auto grow justify-end">
|
<Row className="grow justify-end gap-2">
|
||||||
{onReplyClick && (
|
{onReplyClick && (
|
||||||
<Button
|
<Button
|
||||||
color="gray-white"
|
size={'sm'}
|
||||||
size="2xs"
|
className={clsx(
|
||||||
|
'hover:bg-greyscale-2 mt-0 mb-1 max-w-xs px-0 py-0'
|
||||||
|
)}
|
||||||
|
color={'gray-white'}
|
||||||
onClick={() => onReplyClick(comment)}
|
onClick={() => onReplyClick(comment)}
|
||||||
>
|
>
|
||||||
<ReplyIcon className="h-4 w-4" />
|
<ReplyIcon className="h-5 w-5" />
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
{showTip && (
|
{showTip && (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user