mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: build warnings
This commit is contained in:
parent
7143c98b2e
commit
41c11f70d9
@ -9,7 +9,6 @@ import { ILinkDetails, UserAuth } from "@plane/types";
|
|||||||
// hooks
|
// hooks
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
import { observer } from "mobx-react";
|
import { observer } from "mobx-react";
|
||||||
import { useMeasure } from "@nivo/core";
|
|
||||||
import { useMember } from "hooks/store";
|
import { useMember } from "hooks/store";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
|
@ -116,7 +116,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, cycleId, updateFilters]
|
[workspaceSlug, projectId, cycleId, updateFilters, captureEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFiltersUpdate = useCallback(
|
const handleFiltersUpdate = useCallback(
|
||||||
@ -149,7 +149,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, cycleId, issueFilters, updateFilters]
|
[workspaceSlug, projectId, cycleId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayFilters = useCallback(
|
const handleDisplayFilters = useCallback(
|
||||||
@ -169,7 +169,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, cycleId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, cycleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayProperties = useCallback(
|
const handleDisplayProperties = useCallback(
|
||||||
@ -187,7 +187,7 @@ export const CycleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, cycleId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, cycleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
// derived values
|
// derived values
|
||||||
|
@ -21,11 +21,9 @@ import { EUserWorkspaceRoles } from "constants/workspace";
|
|||||||
import {
|
import {
|
||||||
DP_APPLIED,
|
DP_APPLIED,
|
||||||
DP_REMOVED,
|
DP_REMOVED,
|
||||||
elementFromPath,
|
|
||||||
FILTER_APPLIED,
|
FILTER_APPLIED,
|
||||||
FILTER_REMOVED,
|
FILTER_REMOVED,
|
||||||
FILTER_SEARCHED,
|
FILTER_SEARCHED,
|
||||||
LAYOUT_CHANGED,
|
|
||||||
LP_UPDATED,
|
LP_UPDATED,
|
||||||
} from "constants/event-tracker";
|
} from "constants/event-tracker";
|
||||||
|
|
||||||
@ -56,7 +54,7 @@ export const GlobalIssuesHeader: React.FC<Props> = observer((props) => {
|
|||||||
const {
|
const {
|
||||||
workspace: { workspaceMemberIds },
|
workspace: { workspaceMemberIds },
|
||||||
} = useMember();
|
} = useMember();
|
||||||
const { captureIssuesFilterEvent, captureEvent, captureIssuesDisplayFilterEvent } = useEventTracker();
|
const { captureIssuesFilterEvent, captureIssuesDisplayFilterEvent } = useEventTracker();
|
||||||
|
|
||||||
const issueFilters = globalViewId ? filters[globalViewId.toString()] : undefined;
|
const issueFilters = globalViewId ? filters[globalViewId.toString()] : undefined;
|
||||||
|
|
||||||
@ -97,7 +95,7 @@ export const GlobalIssuesHeader: React.FC<Props> = observer((props) => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[workspaceSlug, issueFilters, updateFilters, globalViewId]
|
[workspaceSlug, issueFilters, updateFilters, globalViewId, captureIssuesFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayFilters = useCallback(
|
const handleDisplayFilters = useCallback(
|
||||||
@ -122,7 +120,7 @@ export const GlobalIssuesHeader: React.FC<Props> = observer((props) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, updateFilters, globalViewId, issueFilters]
|
[workspaceSlug, updateFilters, globalViewId, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayProperties = useCallback(
|
const handleDisplayProperties = useCallback(
|
||||||
@ -146,7 +144,7 @@ export const GlobalIssuesHeader: React.FC<Props> = observer((props) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, updateFilters, globalViewId, issueFilters]
|
[workspaceSlug, updateFilters, globalViewId, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const isAuthorizedUser = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
|
const isAuthorizedUser = !!currentWorkspaceRole && currentWorkspaceRole >= EUserWorkspaceRoles.MEMBER;
|
||||||
|
@ -21,7 +21,7 @@ import { ProjectAnalyticsModal } from "components/analytics";
|
|||||||
import { SidebarHamburgerToggle } from "components/core/sidebar/sidebar-menu-hamburger-toggle";
|
import { SidebarHamburgerToggle } from "components/core/sidebar/sidebar-menu-hamburger-toggle";
|
||||||
import { BreadcrumbLink } from "components/common";
|
import { BreadcrumbLink } from "components/common";
|
||||||
// ui
|
// ui
|
||||||
import { Breadcrumbs, Button, CustomMenu, DiceIcon, LayersIcon } from "@plane/ui";
|
import { Breadcrumbs, Button, CustomMenu, DiceIcon } from "@plane/ui";
|
||||||
// icons
|
// icons
|
||||||
import { ArrowRight, PanelRight, Plus } from "lucide-react";
|
import { ArrowRight, PanelRight, Plus } from "lucide-react";
|
||||||
// helpers
|
// helpers
|
||||||
@ -119,7 +119,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, moduleId, updateFilters]
|
[workspaceSlug, projectId, moduleId, updateFilters, captureEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFiltersUpdate = useCallback(
|
const handleFiltersUpdate = useCallback(
|
||||||
@ -152,7 +152,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, moduleId, issueFilters, updateFilters]
|
[workspaceSlug, projectId, moduleId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayFilters = useCallback(
|
const handleDisplayFilters = useCallback(
|
||||||
@ -172,7 +172,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, moduleId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, moduleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayProperties = useCallback(
|
const handleDisplayProperties = useCallback(
|
||||||
@ -190,7 +190,7 @@ export const ModuleIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, moduleId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, moduleId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
// derived values
|
// derived values
|
||||||
|
@ -96,7 +96,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, issueFilters, updateFilters]
|
[workspaceSlug, projectId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleLayoutChange = useCallback(
|
const handleLayoutChange = useCallback(
|
||||||
@ -110,7 +110,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, updateFilters]
|
[workspaceSlug, projectId, updateFilters, captureEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayFilters = useCallback(
|
const handleDisplayFilters = useCallback(
|
||||||
@ -129,7 +129,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayProperties = useCallback(
|
const handleDisplayProperties = useCallback(
|
||||||
@ -147,7 +147,7 @@ export const ProjectIssuesHeader: React.FC = observer(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const deployUrl = process.env.NEXT_PUBLIC_DEPLOY_URL;
|
const deployUrl = process.env.NEXT_PUBLIC_DEPLOY_URL;
|
||||||
|
@ -81,7 +81,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, viewId, updateFilters]
|
[workspaceSlug, projectId, viewId, updateFilters, captureEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleFiltersUpdate = useCallback(
|
const handleFiltersUpdate = useCallback(
|
||||||
@ -114,7 +114,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, viewId, issueFilters, updateFilters]
|
[workspaceSlug, projectId, viewId, issueFilters, updateFilters, captureIssuesFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayFilters = useCallback(
|
const handleDisplayFilters = useCallback(
|
||||||
@ -133,7 +133,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, viewId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, viewId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDisplayProperties = useCallback(
|
const handleDisplayProperties = useCallback(
|
||||||
@ -151,7 +151,7 @@ export const ProjectViewIssuesHeader: React.FC = observer(() => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
[workspaceSlug, projectId, viewId, updateFilters, issueFilters]
|
[workspaceSlug, projectId, viewId, updateFilters, issueFilters, captureIssuesDisplayFilterEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
const viewDetails = viewId ? getViewById(viewId.toString()) : null;
|
const viewDetails = viewId ? getViewById(viewId.toString()) : null;
|
||||||
|
@ -91,7 +91,7 @@ export const IssueAttachmentRoot: FC<TIssueAttachmentRoot> = (props) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
[workspaceSlug, projectId, issueId, createAttachment, removeAttachment, setToastAlert]
|
[workspaceSlug, projectId, issueId, createAttachment, removeAttachment, setToastAlert, captureIssueEvent]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -115,7 +115,7 @@ export const InboxIssueDetailRoot: FC<TInboxIssueDetailRoot> = (props) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
[inboxId, fetchInboxIssueById, updateInboxIssue, removeInboxIssue, setToastAlert]
|
[inboxId, fetchInboxIssueById, updateInboxIssue, removeInboxIssue, setToastAlert, captureIssueEvent, router.asPath]
|
||||||
);
|
);
|
||||||
|
|
||||||
useSWR(
|
useSWR(
|
||||||
|
@ -132,9 +132,8 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
|||||||
},
|
},
|
||||||
remove: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
remove: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
||||||
try {
|
try {
|
||||||
let response;
|
if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
||||||
if (is_archived) response = await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
else await removeIssue(workspaceSlug, projectId, issueId);
|
||||||
else response = await removeIssue(workspaceSlug, projectId, issueId);
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
title: "Issue deleted successfully",
|
title: "Issue deleted successfully",
|
||||||
type: "success",
|
type: "success",
|
||||||
@ -328,6 +327,8 @@ export const IssueDetailRoot: FC<TIssueDetailRoot> = observer((props) => {
|
|||||||
removeIssueFromModule,
|
removeIssueFromModule,
|
||||||
removeModulesFromIssue,
|
removeModulesFromIssue,
|
||||||
setToastAlert,
|
setToastAlert,
|
||||||
|
captureIssueEvent,
|
||||||
|
router.asPath,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { observer } from "mobx-react-lite";
|
|||||||
import { PlusIcon } from "lucide-react";
|
import { PlusIcon } from "lucide-react";
|
||||||
import { useTheme } from "next-themes";
|
import { useTheme } from "next-themes";
|
||||||
// hooks
|
// hooks
|
||||||
import { useApplication, useEventTracker, useIssueDetail, useIssues, useUser } from "hooks/store";
|
import { useApplication, useEventTracker, useIssues, useUser } from "hooks/store";
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
// components
|
// components
|
||||||
import { ExistingIssuesListModal } from "components/core";
|
import { ExistingIssuesListModal } from "components/core";
|
||||||
@ -43,7 +43,6 @@ export const CycleEmptyState: React.FC<Props> = observer((props) => {
|
|||||||
const { resolvedTheme } = useTheme();
|
const { resolvedTheme } = useTheme();
|
||||||
// store hooks
|
// store hooks
|
||||||
const { issues } = useIssues(EIssuesStoreType.CYCLE);
|
const { issues } = useIssues(EIssuesStoreType.CYCLE);
|
||||||
const { updateIssue, fetchIssue } = useIssueDetail();
|
|
||||||
const {
|
const {
|
||||||
commandPalette: { toggleCreateIssueModal },
|
commandPalette: { toggleCreateIssueModal },
|
||||||
} = useApplication();
|
} = useApplication();
|
||||||
|
@ -42,7 +42,7 @@ export const FilterSelection: React.FC<Props> = observer((props) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (debouncedValue && onSearchCapture) onSearchCapture();
|
if (debouncedValue && onSearchCapture) onSearchCapture();
|
||||||
}, [debouncedValue]);
|
}, [debouncedValue, onSearchCapture]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex h-full w-full flex-col overflow-hidden">
|
<div className="flex h-full w-full flex-col overflow-hidden">
|
||||||
|
@ -44,7 +44,7 @@ const KanbanIssueDetailsBlock: React.FC<IssueDetailsBlockProps> = observer((prop
|
|||||||
// hooks
|
// hooks
|
||||||
const { getProjectById } = useProject();
|
const { getProjectById } = useProject();
|
||||||
const {
|
const {
|
||||||
router: { workspaceSlug, projectId },
|
router: { workspaceSlug },
|
||||||
} = useApplication();
|
} = useApplication();
|
||||||
const { setPeekIssue } = useIssueDetail();
|
const { setPeekIssue } = useIssueDetail();
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
// components
|
// components
|
||||||
import { CustomMenu } from "@plane/ui";
|
import { CustomMenu } from "@plane/ui";
|
||||||
import { ExistingIssuesListModal } from "components/core";
|
import { ExistingIssuesListModal } from "components/core";
|
||||||
import { CreateUpdateIssueModal, CreateUpdateDraftIssueModal } from "components/issues";
|
import { CreateUpdateIssueModal } from "components/issues";
|
||||||
// lucide icons
|
// lucide icons
|
||||||
import { Minimize2, Maximize2, Circle, Plus } from "lucide-react";
|
import { Minimize2, Maximize2, Circle, Plus } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
|
@ -24,7 +24,7 @@ export const IssueBlock: React.FC<IssueBlockProps> = observer((props: IssueBlock
|
|||||||
const { issuesMap, issueId, handleIssues, quickActions, displayProperties, canEditProperties } = props;
|
const { issuesMap, issueId, handleIssues, quickActions, displayProperties, canEditProperties } = props;
|
||||||
// hooks
|
// hooks
|
||||||
const {
|
const {
|
||||||
router: { workspaceSlug, projectId },
|
router: { workspaceSlug },
|
||||||
} = useApplication();
|
} = useApplication();
|
||||||
const { getProjectById } = useProject();
|
const { getProjectById } = useProject();
|
||||||
const { peekIssue, setPeekIssue } = useIssueDetail();
|
const { peekIssue, setPeekIssue } = useIssueDetail();
|
||||||
|
@ -2,7 +2,7 @@ import { useRouter } from "next/router";
|
|||||||
// lucide icons
|
// lucide icons
|
||||||
import { CircleDashed, Plus } from "lucide-react";
|
import { CircleDashed, Plus } from "lucide-react";
|
||||||
// components
|
// components
|
||||||
import { CreateUpdateIssueModal, CreateUpdateDraftIssueModal } from "components/issues";
|
import { CreateUpdateIssueModal } from "components/issues";
|
||||||
import { ExistingIssuesListModal } from "components/core";
|
import { ExistingIssuesListModal } from "components/core";
|
||||||
import { CustomMenu } from "@plane/ui";
|
import { CustomMenu } from "@plane/ui";
|
||||||
// mobx
|
// mobx
|
||||||
|
@ -3,7 +3,7 @@ import { useRouter } from "next/router";
|
|||||||
import { observer } from "mobx-react-lite";
|
import { observer } from "mobx-react-lite";
|
||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useApplication, useEventTracker, useCycle, useIssues, useModule, useProject, useWorkspace } from "hooks/store";
|
import { useApplication, useEventTracker, useCycle, useIssues, useModule, useProject } from "hooks/store";
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
import useLocalStorage from "hooks/use-local-storage";
|
import useLocalStorage from "hooks/use-local-storage";
|
||||||
// components
|
// components
|
||||||
@ -44,7 +44,6 @@ export const CreateUpdateIssueModal: React.FC<IssuesModalProps> = observer((prop
|
|||||||
const {
|
const {
|
||||||
router: { workspaceSlug, projectId, cycleId, moduleId, viewId: projectViewId },
|
router: { workspaceSlug, projectId, cycleId, moduleId, viewId: projectViewId },
|
||||||
} = useApplication();
|
} = useApplication();
|
||||||
const { currentWorkspace } = useWorkspace();
|
|
||||||
const { workspaceProjectIds } = useProject();
|
const { workspaceProjectIds } = useProject();
|
||||||
const { fetchCycleDetails } = useCycle();
|
const { fetchCycleDetails } = useCycle();
|
||||||
const { fetchModuleDetails } = useModule();
|
const { fetchModuleDetails } = useModule();
|
||||||
|
@ -85,7 +85,7 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
|||||||
showToast: boolean = true
|
showToast: boolean = true
|
||||||
) => {
|
) => {
|
||||||
try {
|
try {
|
||||||
const response = await updateIssue(workspaceSlug, projectId, issueId, data);
|
await updateIssue(workspaceSlug, projectId, issueId, data);
|
||||||
if (showToast)
|
if (showToast)
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
title: "Issue updated successfully",
|
title: "Issue updated successfully",
|
||||||
@ -116,9 +116,8 @@ export const IssuePeekOverview: FC<IIssuePeekOverview> = observer((props) => {
|
|||||||
},
|
},
|
||||||
remove: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
remove: async (workspaceSlug: string, projectId: string, issueId: string) => {
|
||||||
try {
|
try {
|
||||||
let response;
|
if (is_archived) await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
||||||
if (is_archived) response = await removeArchivedIssue(workspaceSlug, projectId, issueId);
|
else await removeIssue(workspaceSlug, projectId, issueId);
|
||||||
else response = await removeIssue(workspaceSlug, projectId, issueId);
|
|
||||||
setToastAlert({
|
setToastAlert({
|
||||||
title: "Issue deleted successfully",
|
title: "Issue deleted successfully",
|
||||||
type: "success",
|
type: "success",
|
||||||
|
@ -273,7 +273,17 @@ export const SubIssuesRoot: FC<ISubIssuesRoot> = observer((props) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
[fetchSubIssues, createSubIssues, updateSubIssue, removeSubIssue, deleteSubIssue, setToastAlert, setSubIssueHelpers]
|
[
|
||||||
|
fetchSubIssues,
|
||||||
|
createSubIssues,
|
||||||
|
updateSubIssue,
|
||||||
|
removeSubIssue,
|
||||||
|
deleteSubIssue,
|
||||||
|
setToastAlert,
|
||||||
|
setSubIssueHelpers,
|
||||||
|
captureIssueEvent,
|
||||||
|
router.asPath,
|
||||||
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
const issue = getIssueById(parentIssueId);
|
const issue = getIssueById(parentIssueId);
|
||||||
|
@ -4,7 +4,7 @@ import { Controller, useForm } from "react-hook-form";
|
|||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
import { AlertTriangle } from "lucide-react";
|
import { AlertTriangle } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEventTracker, useProject, useWorkspace } from "hooks/store";
|
import { useEventTracker, useProject } from "hooks/store";
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
// ui
|
// ui
|
||||||
import { Button, Input } from "@plane/ui";
|
import { Button, Input } from "@plane/ui";
|
||||||
@ -28,7 +28,6 @@ export const DeleteProjectModal: React.FC<DeleteProjectModal> = (props) => {
|
|||||||
const { isOpen, project, onClose } = props;
|
const { isOpen, project, onClose } = props;
|
||||||
// store hooks
|
// store hooks
|
||||||
const { captureProjectEvent } = useEventTracker();
|
const { captureProjectEvent } = useEventTracker();
|
||||||
const { currentWorkspace } = useWorkspace();
|
|
||||||
const { deleteProject } = useProject();
|
const { deleteProject } = useProject();
|
||||||
// router
|
// router
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -5,16 +5,14 @@ import { useForm, Controller, useFieldArray } from "react-hook-form";
|
|||||||
import { Dialog, Transition } from "@headlessui/react";
|
import { Dialog, Transition } from "@headlessui/react";
|
||||||
import { ChevronDown, Plus, X } from "lucide-react";
|
import { ChevronDown, Plus, X } from "lucide-react";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEventTracker, useMember, useUser, useWorkspace } from "hooks/store";
|
import { useEventTracker, useMember, useUser } from "hooks/store";
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
// ui
|
// ui
|
||||||
import { Avatar, Button, CustomSelect, CustomSearchSelect } from "@plane/ui";
|
import { Avatar, Button, CustomSelect, CustomSearchSelect } from "@plane/ui";
|
||||||
// helpers
|
|
||||||
import { getUserRole } from "helpers/user.helper";
|
|
||||||
// constants
|
// constants
|
||||||
import { ROLE } from "constants/workspace";
|
|
||||||
import { EUserProjectRoles } from "constants/project";
|
import { EUserProjectRoles } from "constants/project";
|
||||||
import { PROJECT_MEMBER_ADDED } from "constants/event-tracker";
|
import { PROJECT_MEMBER_ADDED } from "constants/event-tracker";
|
||||||
|
import { ROLE } from "constants/workspace";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
@ -4,7 +4,7 @@ import { observer } from "mobx-react-lite";
|
|||||||
import { ContrastIcon, FileText, Inbox, Layers } from "lucide-react";
|
import { ContrastIcon, FileText, Inbox, Layers } from "lucide-react";
|
||||||
import { DiceIcon, ToggleSwitch } from "@plane/ui";
|
import { DiceIcon, ToggleSwitch } from "@plane/ui";
|
||||||
// hooks
|
// hooks
|
||||||
import { useEventTracker, useProject, useUser, useWorkspace } from "hooks/store";
|
import { useEventTracker, useProject, useUser } from "hooks/store";
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
// types
|
// types
|
||||||
import { IProject } from "@plane/types";
|
import { IProject } from "@plane/types";
|
||||||
|
@ -83,7 +83,7 @@ export const ProjectSidebarListItem: React.FC<Props> = observer((props) => {
|
|||||||
// store hooks
|
// store hooks
|
||||||
const { theme: themeStore } = useApplication();
|
const { theme: themeStore } = useApplication();
|
||||||
const { setTrackElement } = useEventTracker();
|
const { setTrackElement } = useEventTracker();
|
||||||
const { currentProjectDetails, addProjectToFavorites, removeProjectFromFavorites, getProjectById } = useProject();
|
const { addProjectToFavorites, removeProjectFromFavorites, getProjectById } = useProject();
|
||||||
const { getInboxesByProjectId, getInboxById } = useInbox();
|
const { getInboxesByProjectId, getInboxById } = useInbox();
|
||||||
// states
|
// states
|
||||||
const [leaveProjectModalOpen, setLeaveProjectModal] = useState(false);
|
const [leaveProjectModalOpen, setLeaveProjectModal] = useState(false);
|
||||||
@ -145,7 +145,7 @@ export const ProjectSidebarListItem: React.FC<Props> = observer((props) => {
|
|||||||
if (window.innerWidth < 768) {
|
if (window.innerWidth < 768) {
|
||||||
themeStore.toggleMobileSidebar();
|
themeStore.toggleMobileSidebar();
|
||||||
}
|
}
|
||||||
setTrackElement('Project sidebar');
|
setTrackElement("Project sidebar");
|
||||||
};
|
};
|
||||||
|
|
||||||
useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false));
|
useOutsideClickDetector(actionSectionRef, () => setIsMenuActive(false));
|
||||||
|
@ -8,7 +8,7 @@ import { mutate } from "swr";
|
|||||||
import { Check, ChevronDown, CircleUserRound, LogOut, Mails, PlusSquare, Settings, UserCircle2 } from "lucide-react";
|
import { Check, ChevronDown, CircleUserRound, LogOut, Mails, PlusSquare, Settings, UserCircle2 } from "lucide-react";
|
||||||
import { usePopper } from "react-popper";
|
import { usePopper } from "react-popper";
|
||||||
// hooks
|
// hooks
|
||||||
import { useApplication, useEventTracker, useUser, useWorkspace } from "hooks/store";
|
import { useApplication, useUser, useWorkspace } from "hooks/store";
|
||||||
// hooks
|
// hooks
|
||||||
import useToast from "hooks/use-toast";
|
import useToast from "hooks/use-toast";
|
||||||
// ui
|
// ui
|
||||||
|
@ -54,7 +54,7 @@ const PostHogProvider: FC<IPosthogWrapper> = (props) => {
|
|||||||
posthog?.identify(user.email);
|
posthog?.identify(user.email);
|
||||||
posthog?.group(GROUP_WORKSPACE, currentWorkspaceId);
|
posthog?.group(GROUP_WORKSPACE, currentWorkspaceId);
|
||||||
}
|
}
|
||||||
}, [currentWorkspaceId, user]);
|
}, [currentWorkspaceId, lastWorkspaceId, user]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Track page views
|
// Track page views
|
||||||
|
Loading…
Reference in New Issue
Block a user