File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import {usePersistentInMemoryState} from 'web/hooks/use-persistent-in-memory-sta
4242import { useIsLooking } from 'web/hooks/use-is-looking'
4343import { DropdownButton } from '../filters/desktop-filters'
4444import { buildArray } from 'common/util/array'
45+ import toast from "react-hot-toast" ;
4546
4647const NUM_QUESTIONS_TO_SHOW = 8
4748
@@ -407,7 +408,10 @@ export function CompatibilityAnswerBlock(props: {
407408 name : 'Delete' ,
408409 icon : < TrashIcon className = "h-5 w-5" /> ,
409410 onClick : ( ) => {
410- deleteCompatibilityAnswer ( answer . id , user . id ) . then ( ( ) => refreshCompatibilityAll ( ) )
411+ deleteCompatibilityAnswer ( answer . id , user . id )
412+ . then ( ( ) => refreshCompatibilityAll ( ) )
413+ . catch ( ( e ) => { toast . error ( e . message ) } )
414+ . finally ( ( ) => { } )
411415 } ,
412416 } ,
413417 ] }
@@ -425,9 +429,9 @@ export function CompatibilityAnswerBlock(props: {
425429 icon : < TrashIcon className = "h-5 w-5" /> ,
426430 onClick : ( ) => {
427431 submitCompatibilityAnswer ( getEmptyAnswer ( user . id , question . id ) )
428- . then ( ( ) => { } )
432+ . then ( ( ) => { refreshCompatibilityAll ( ) } )
433+ . catch ( ( e ) => { toast . error ( e . message ) } )
429434 . finally ( ( ) => { } )
430- refreshCompatibilityAll ( )
431435 } ,
432436 } ,
433437 ] }
You can’t perform that action at this time.
0 commit comments