1- import { PlusIcon } from '@heroicons/react/outline'
1+ import { ArrowLeftIcon , PlusIcon } from '@heroicons/react/outline'
22import clsx from 'clsx'
3- import { User } from 'common/user'
4- import { QuestionWithCountType } from 'web/hooks/use-questions'
5- import { Button } from 'web/components/buttons/button'
6- import { Col } from 'web/components/layout/col'
7- import {
8- MODAL_CLASS ,
9- Modal ,
10- SCROLLABLE_MODAL_CLASS ,
11- } from 'web/components/layout/modal'
12- import { Row } from 'web/components/layout/row'
13- import { IndividualQuestionRow } from '../questions-form'
14- import { TbMessage } from 'react-icons/tb'
15- import { OtherProfileAnswers } from './other-profile-answers'
16- import { ArrowLeftIcon } from '@heroicons/react/outline'
17- import { usePersistentInMemoryState } from 'web/hooks/use-persistent-in-memory-state'
3+ import { User } from 'common/user'
4+ import { QuestionWithCountType } from 'web/hooks/use-questions'
5+ import { Button } from 'web/components/buttons/button'
6+ import { Col } from 'web/components/layout/col'
7+ import { Modal , MODAL_CLASS , SCROLLABLE_MODAL_CLASS , } from 'web/components/layout/modal'
8+ import { Row } from 'web/components/layout/row'
9+ import { IndividualQuestionRow } from '../questions-form'
10+ import { TbMessage } from 'react-icons/tb'
11+ import { OtherProfileAnswers } from './other-profile-answers'
12+ import { usePersistentInMemoryState } from 'web/hooks/use-persistent-in-memory-state'
1813
1914export function AddQuestionButton ( props : {
2015 isFirstQuestion ?: boolean
2116 questions : QuestionWithCountType [ ]
2217 user : User
2318 refreshAnswers : ( ) => void
2419} ) {
25- const { isFirstQuestion , questions, user, refreshAnswers } = props
20+ const { questions, user, refreshAnswers} = props
2621 const [ openModal , setOpenModal ] = usePersistentInMemoryState (
2722 false ,
2823 `add-question-${ user . id } `
@@ -31,7 +26,7 @@ export function AddQuestionButton(props: {
3126 < >
3227 < Button color = { 'gray-outline' } onClick = { ( ) => setOpenModal ( true ) } >
3328 < Row className = "items-center gap-1" >
34- < PlusIcon className = "h-4 w-4" />
29+ < PlusIcon className = "h-4 w-4" />
3530 Add Free Response
3631 </ Row >
3732 </ Button >
@@ -53,7 +48,7 @@ function AddQuestionModal(props: {
5348 user : User
5449 refreshAnswers : ( ) => void
5550} ) {
56- const { open, setOpen, questions, user, refreshAnswers } = props
51+ const { open, setOpen, questions, user, refreshAnswers} = props
5752 const addableQuestions = questions . filter (
5853 ( q ) => q . answer_type === 'free_response'
5954 )
@@ -83,7 +78,7 @@ function AddQuestionModal(props: {
8378 setExpandedQuestion ( null )
8479 } }
8580 >
86- < ArrowLeftIcon className = { 'h-4 w-4' } />
81+ < ArrowLeftIcon className = { 'h-4 w-4' } />
8782 </ Button >
8883 < span className = "font-semibold" > { expandedQuestion . question } </ span >
8984 </ Row >
@@ -120,7 +115,7 @@ function AddQuestionModal(props: {
120115 } }
121116 >
122117 { question . answer_count }
123- < TbMessage className = "h-4 w-4" />
118+ < TbMessage className = "h-4 w-4" />
124119 </ button >
125120 </ Row >
126121 )
0 commit comments