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 { 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: { | ||||
|   contract: FreeResponseContract | MultipleChoiceContract | ||||
|   onAnswerCommentClick: (answer: Answer) => void | ||||
|  |  | |||
|  | @ -90,9 +90,7 @@ export function AnswerCommentInput(props: { | |||
| 
 | ||||
|   return ( | ||||
|     <> | ||||
|       <Row className="gap-2"> | ||||
|         <CommentsAnswer answer={answerResponse} contract={contract} /> | ||||
|       </Row> | ||||
|       <CommentsAnswer answer={answerResponse} contract={contract} /> | ||||
|       <Row> | ||||
|         <div className="ml-1"> | ||||
|           <Curve size={28} strokeWidth={1} color="#D8D8EB" /> | ||||
|  |  | |||
|  | @ -154,14 +154,17 @@ export function ParentFeedComment(props: { | |||
|             numComments={numComments} | ||||
|             onClick={onSeeReplyClick} | ||||
|           /> | ||||
|           <Row className="my-auto grow justify-end"> | ||||
|           <Row className="grow justify-end gap-2"> | ||||
|             {onReplyClick && ( | ||||
|               <Button | ||||
|                 color="gray-white" | ||||
|                 size="2xs" | ||||
|                 size={'sm'} | ||||
|                 className={clsx( | ||||
|                   'hover:bg-greyscale-2 mt-0 mb-1 max-w-xs px-0 py-0' | ||||
|                 )} | ||||
|                 color={'gray-white'} | ||||
|                 onClick={() => onReplyClick(comment)} | ||||
|               > | ||||
|                 <ReplyIcon className="h-4 w-4" /> | ||||
|                 <ReplyIcon className="h-5 w-5" /> | ||||
|               </Button> | ||||
|             )} | ||||
|             {showTip && ( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user