From b885f14dc42f882d23fab1c9f6748a397c63927f Mon Sep 17 00:00:00 2001 From: sriramveeraghanta Date: Mon, 14 Aug 2023 19:43:28 +0530 Subject: [PATCH] type fixes --- apps/app/components/inbox/inbox-action-headers.tsx | 4 ++-- apps/app/components/issues/activity.tsx | 5 ++++- apps/app/components/issues/sidebar-select/label.tsx | 2 +- apps/app/components/labels/labels-list-modal.tsx | 4 ++-- apps/app/components/modules/modules-list-gantt-chart.tsx | 4 ++-- apps/app/components/profile/profile-issues-view.tsx | 2 +- 6 files changed, 12 insertions(+), 9 deletions(-) diff --git a/apps/app/components/inbox/inbox-action-headers.tsx b/apps/app/components/inbox/inbox-action-headers.tsx index 6659485ed..86bc15d01 100644 --- a/apps/app/components/inbox/inbox-action-headers.tsx +++ b/apps/app/components/inbox/inbox-action-headers.tsx @@ -72,8 +72,8 @@ export const InboxActionHeader = () => { false ); mutateInboxIssues( - (prevData) => - (prevData ?? []).map((i) => + (prevData: any) => + (prevData ?? []).map((i: any) => i.bridge_id === inboxIssueId ? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] } : i diff --git a/apps/app/components/issues/activity.tsx b/apps/app/components/issues/activity.tsx index 9eb5d0c8b..1b5cd6e4c 100644 --- a/apps/app/components/issues/activity.tsx +++ b/apps/app/components/issues/activity.tsx @@ -54,7 +54,10 @@ export const IssueActivitySection: React.FC = ({ issueId, user }) => { const handleCommentDelete = async (commentId: string) => { if (!workspaceSlug || !projectId || !issueId) return; - mutateIssueActivities((prevData) => prevData?.filter((p) => p.id !== commentId), false); + mutateIssueActivities( + (prevData: any) => prevData?.filter((p: any) => p.id !== commentId), + false + ); await issuesService .deleteIssueComment( diff --git a/apps/app/components/issues/sidebar-select/label.tsx b/apps/app/components/issues/sidebar-select/label.tsx index 30ea71b04..5f3539c86 100644 --- a/apps/app/components/issues/sidebar-select/label.tsx +++ b/apps/app/components/issues/sidebar-select/label.tsx @@ -85,7 +85,7 @@ export const SidebarLabelSelect: React.FC = ({ .then((res) => { reset(defaultValues); - issueLabelMutate((prevData) => [...(prevData ?? []), res], false); + issueLabelMutate((prevData: any) => [...(prevData ?? []), res], false); submitChanges({ labels_list: [...(issueDetails?.labels ?? []), res.id] }); diff --git a/apps/app/components/labels/labels-list-modal.tsx b/apps/app/components/labels/labels-list-modal.tsx index 265b42908..9042bde3a 100644 --- a/apps/app/components/labels/labels-list-modal.tsx +++ b/apps/app/components/labels/labels-list-modal.tsx @@ -49,8 +49,8 @@ export const LabelsListModal: React.FC = ({ isOpen, handleClose, parent, if (!workspaceSlug || !projectId) return; mutate( - (prevData) => - prevData?.map((l) => { + (prevData: any) => + prevData?.map((l: any) => { if (l.id === label.id) return { ...l, parent: parent?.id ?? "" }; return l; diff --git a/apps/app/components/modules/modules-list-gantt-chart.tsx b/apps/app/components/modules/modules-list-gantt-chart.tsx index 64ceccd1a..7dc281fb3 100644 --- a/apps/app/components/modules/modules-list-gantt-chart.tsx +++ b/apps/app/components/modules/modules-list-gantt-chart.tsx @@ -42,10 +42,10 @@ export const ModulesListGanttChartView: FC = ({ modules, mutateModules }) const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => { if (!workspaceSlug || !user) return; - mutateModules((prevData) => { + mutateModules((prevData: any) => { if (!prevData) return prevData; - const newList = prevData.map((p) => ({ + const newList = prevData.map((p: any) => ({ ...p, ...(p.id === module.id ? { diff --git a/apps/app/components/profile/profile-issues-view.tsx b/apps/app/components/profile/profile-issues-view.tsx index 0b63f87a5..44120a61c 100644 --- a/apps/app/components/profile/profile-issues-view.tsx +++ b/apps/app/components/profile/profile-issues-view.tsx @@ -110,7 +110,7 @@ export const ProfileIssuesView = () => { draggedItem[groupByProperty] = destinationGroup; - mutateProfileIssues((prevData) => { + mutateProfileIssues((prevData: any) => { if (!prevData) return prevData; const sourceGroupArray = [...groupedIssues[sourceGroup]];