type fixes

This commit is contained in:
sriramveeraghanta 2023-08-14 19:43:28 +05:30
parent e03c4487d1
commit b885f14dc4
6 changed files with 12 additions and 9 deletions

View File

@ -72,8 +72,8 @@ export const InboxActionHeader = () => {
false false
); );
mutateInboxIssues( mutateInboxIssues(
(prevData) => (prevData: any) =>
(prevData ?? []).map((i) => (prevData ?? []).map((i: any) =>
i.bridge_id === inboxIssueId i.bridge_id === inboxIssueId
? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] } ? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] }
: i : i

View File

@ -54,7 +54,10 @@ export const IssueActivitySection: React.FC<Props> = ({ issueId, user }) => {
const handleCommentDelete = async (commentId: string) => { const handleCommentDelete = async (commentId: string) => {
if (!workspaceSlug || !projectId || !issueId) return; 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 await issuesService
.deleteIssueComment( .deleteIssueComment(

View File

@ -85,7 +85,7 @@ export const SidebarLabelSelect: React.FC<Props> = ({
.then((res) => { .then((res) => {
reset(defaultValues); reset(defaultValues);
issueLabelMutate((prevData) => [...(prevData ?? []), res], false); issueLabelMutate((prevData: any) => [...(prevData ?? []), res], false);
submitChanges({ labels_list: [...(issueDetails?.labels ?? []), res.id] }); submitChanges({ labels_list: [...(issueDetails?.labels ?? []), res.id] });

View File

@ -49,8 +49,8 @@ export const LabelsListModal: React.FC<Props> = ({ isOpen, handleClose, parent,
if (!workspaceSlug || !projectId) return; if (!workspaceSlug || !projectId) return;
mutate( mutate(
(prevData) => (prevData: any) =>
prevData?.map((l) => { prevData?.map((l: any) => {
if (l.id === label.id) return { ...l, parent: parent?.id ?? "" }; if (l.id === label.id) return { ...l, parent: parent?.id ?? "" };
return l; return l;

View File

@ -42,10 +42,10 @@ export const ModulesListGanttChartView: FC<Props> = ({ modules, mutateModules })
const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => { const handleModuleUpdate = (module: IModule, payload: IBlockUpdateData) => {
if (!workspaceSlug || !user) return; if (!workspaceSlug || !user) return;
mutateModules((prevData) => { mutateModules((prevData: any) => {
if (!prevData) return prevData; if (!prevData) return prevData;
const newList = prevData.map((p) => ({ const newList = prevData.map((p: any) => ({
...p, ...p,
...(p.id === module.id ...(p.id === module.id
? { ? {

View File

@ -110,7 +110,7 @@ export const ProfileIssuesView = () => {
draggedItem[groupByProperty] = destinationGroup; draggedItem[groupByProperty] = destinationGroup;
mutateProfileIssues((prevData) => { mutateProfileIssues((prevData: any) => {
if (!prevData) return prevData; if (!prevData) return prevData;
const sourceGroupArray = [...groupedIssues[sourceGroup]]; const sourceGroupArray = [...groupedIssues[sourceGroup]];