Explorar o código

update DeleteCommentModal for fadeout

jam411 %!s(int64=3) %!d(string=hai) anos
pai
achega
dba24206bc

+ 0 - 1
packages/app/src/components/PageComment.tsx

@@ -97,7 +97,6 @@ export const PageComment: FC<PageCommentProps> = memo((props:PageCommentProps):
   }, []);
   }, []);
 
 
   const onCancelDeleteComment = useCallback(() => {
   const onCancelDeleteComment = useCallback(() => {
-    setCommentToBeDeleted(null);
     setIsDeleteConfirmModalShown(false);
     setIsDeleteConfirmModalShown(false);
   }, []);
   }, []);
 
 

+ 1 - 1
packages/app/src/components/PageComment/DeleteCommentModal.tsx

@@ -16,7 +16,7 @@ export type DeleteCommentModalProps = {
   isShown: boolean,
   isShown: boolean,
   comment: ICommentHasId,
   comment: ICommentHasId,
   errorMessage: string,
   errorMessage: string,
-  cancel: () => void, // for cancel evnet handling
+  cancel: (value: any) => void, // for cancel evnet handling
   confirmedToDelete: () => void, // for confirmed event handling
   confirmedToDelete: () => void, // for confirmed event handling
 }
 }