@@ -22,13 +22,17 @@ import {Subtitle} from '../widgets/profile-subtitle'
2222import { AddCompatibilityQuestionButton } from './add-compatibility-question-button'
2323import {
2424 AnswerCompatibilityQuestionButton ,
25- AnswerSkippedCompatibilityQuestionsButton , CompatibilityPageButton ,
25+ AnswerSkippedCompatibilityQuestionsButton ,
26+ CompatibilityPageButton ,
2627} from './answer-compatibility-question-button'
2728import {
28- AnswerCompatibilityQuestionContent , CompatibilityAnswerSubmitType ,
29- deleteCompatibilityAnswer , getEmptyAnswer ,
29+ AnswerCompatibilityQuestionContent ,
30+ CompatibilityAnswerSubmitType ,
31+ deleteCompatibilityAnswer ,
32+ getEmptyAnswer ,
3033 IMPORTANCE_CHOICES ,
3134 IMPORTANCE_DISPLAY_COLORS ,
35+ submitCompatibilityAnswer ,
3236} from './answer-compatibility-question-content'
3337import clsx from 'clsx'
3438import { shortenName } from 'web/components/widgets/user-link'
@@ -363,6 +367,7 @@ export function CompatibilityAnswerBlock(props: {
363367 answerText && ! preferredAnswersText . includes ( answerText )
364368
365369 const isAnswered = answer && answer . multiple_choice > - 1
370+ const isSkipped = answer && answer . importance == - 1
366371 return (
367372 < Col
368373 className = {
@@ -411,6 +416,26 @@ export function CompatibilityAnswerBlock(props: {
411416 />
412417 </ >
413418 ) }
419+ { isCurrentUser && ! isAnswered && ! isSkipped && (
420+ < >
421+ < DropdownMenu
422+ items = { [
423+ {
424+ name : 'Skip' ,
425+ icon : < TrashIcon className = "h-5 w-5" /> ,
426+ onClick : ( ) => {
427+ submitCompatibilityAnswer ( getEmptyAnswer ( user . id , question . id ) )
428+ . then ( ( ) => { } )
429+ . finally ( ( ) => { } )
430+ refreshCompatibilityAll ( )
431+ } ,
432+ } ,
433+ ] }
434+ closeOnClick
435+ menuWidth = "w-40"
436+ />
437+ </ >
438+ ) }
414439 </ Row >
415440 </ Row >
416441 { answerText && < Row className = "bg-canvas-100 w-fit gap-1 rounded px-2 py-1 text-sm" >
@@ -497,7 +522,7 @@ export function CompatibilityAnswerBlock(props: {
497522 refreshCompatibilityAll ( )
498523 } }
499524 isLastQuestion = { true }
500- noSkip
525+ noSkip = { isAnswered }
501526 />
502527 </ Col >
503528 </ Modal >
0 commit comments