Skip to content

Commit

Permalink
fix: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
denys-kolomiitsev committed Jan 31, 2024
1 parent 31eacdc commit c51f3ce
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/components/Chatbar/components/Conversation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,17 @@ export const ConversationComponent = ({ item: conversation, level }: Props) => {
},
[conversation.id, dispatch],
);
const handleOpenExportModal = useCallback(() => {
setIsShowExportModal(true);
}, []);
const handleCloseExportModal = useCallback(() => {
setIsShowExportModal(false);
}, []);

const handleExport = useCallback(
(args?: { withAttachments?: boolean }) => {
if (args?.withAttachments) {
(args?: unknown) => {
const typedArgs = args as { withAttachments?: boolean };
if (typedArgs?.withAttachments) {
dispatch(
ImportExportActions.exportConversation({
conversationId: conversation.id,
Expand All @@ -364,17 +371,11 @@ export const ConversationComponent = ({ item: conversation, level }: Props) => {
}),
);
}
handleCloseExportModal();
},
[conversation.id, dispatch],
[conversation.id, dispatch, handleCloseExportModal],
);

const handleOpenExportModal = useCallback(() => {
setIsShowExportModal(true);
}, []);
const handleCloseExportModal = useCallback(() => {
setIsShowExportModal(false);
}, []);

const handleContextMenuOpen = (e: MouseEvent) => {
if (hasParentWithFloatingOverlay(e.target as Element)) {
return;
Expand Down

0 comments on commit c51f3ce

Please sign in to comment.