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
);
mutateInboxIssues(
(prevData) =>
(prevData ?? []).map((i) =>
(prevData: any) =>
(prevData ?? []).map((i: any) =>
i.bridge_id === inboxIssueId
? { ...i, issue_inbox: [{ ...i.issue_inbox[0], ...data }] }
: i

View File

@ -54,7 +54,10 @@ export const IssueActivitySection: React.FC<Props> = ({ 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(

View File

@ -85,7 +85,7 @@ export const SidebarLabelSelect: React.FC<Props> = ({
.then((res) => {
reset(defaultValues);
issueLabelMutate((prevData) => [...(prevData ?? []), res], false);
issueLabelMutate((prevData: any) => [...(prevData ?? []), res], false);
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;
mutate(
(prevData) =>
prevData?.map((l) => {
(prevData: any) =>
prevData?.map((l: any) => {
if (l.id === label.id) return { ...l, parent: parent?.id ?? "" };
return l;

View File

@ -42,10 +42,10 @@ export const ModulesListGanttChartView: FC<Props> = ({ 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
? {

View File

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