From 7d08a57be6a5e53c6a1cbd3380a804492af8b46b Mon Sep 17 00:00:00 2001 From: Aaryan Khandelwal <65252264+aaryan610@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:53:08 +0530 Subject: [PATCH] chore: remove build warnings (#3534) * chore: remove build warnings * fix: posthog wrapper fixes --------- Co-authored-by: sriram veeraghanta --- web/components/core/modals/gpt-assistant-popover.tsx | 1 + web/components/dashboard/widgets/overview-stats.tsx | 1 - web/components/issues/issue-layouts/empty-states/module.tsx | 3 +-- .../issue-layouts/spreadsheet/base-spreadsheet-root.tsx | 1 + web/components/issues/issue-modal/form.tsx | 1 + web/lib/app-provider.tsx | 5 ++--- web/lib/wrappers/posthog-wrapper.tsx | 6 +++--- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/web/components/core/modals/gpt-assistant-popover.tsx b/web/components/core/modals/gpt-assistant-popover.tsx index 3afd6d1b9..590015e12 100644 --- a/web/components/core/modals/gpt-assistant-popover.tsx +++ b/web/components/core/modals/gpt-assistant-popover.tsx @@ -157,6 +157,7 @@ export const GptAssistantPopover: React.FC = (props) => { window.removeEventListener("keydown", handleEnterKeyPress); window.removeEventListener("keydown", handleEscapeKeyPress); }; + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isOpen, handleSubmit, onClose]); const responseActionButton = response !== "" && ( diff --git a/web/components/dashboard/widgets/overview-stats.tsx b/web/components/dashboard/widgets/overview-stats.tsx index 418f0c63f..1a4c2646b 100644 --- a/web/components/dashboard/widgets/overview-stats.tsx +++ b/web/components/dashboard/widgets/overview-stats.tsx @@ -7,7 +7,6 @@ import { useDashboard } from "hooks/store"; import { WidgetLoader } from "components/dashboard/widgets"; // helpers import { renderFormattedPayloadDate } from "helpers/date-time.helper"; -import { cn } from "helpers/common.helper"; // types import { TOverviewStatsWidgetResponse } from "@plane/types"; diff --git a/web/components/issues/issue-layouts/empty-states/module.tsx b/web/components/issues/issue-layouts/empty-states/module.tsx index aa3a8dc19..109a903a2 100644 --- a/web/components/issues/issue-layouts/empty-states/module.tsx +++ b/web/components/issues/issue-layouts/empty-states/module.tsx @@ -2,7 +2,7 @@ import { useState } from "react"; import { observer } from "mobx-react-lite"; import { PlusIcon } from "lucide-react"; // hooks -import { useApplication, useIssueDetail, useIssues, useUser } from "hooks/store"; +import { useApplication, useIssues, useUser } from "hooks/store"; import useToast from "hooks/use-toast"; // components import { EmptyState } from "components/common"; @@ -29,7 +29,6 @@ export const ModuleEmptyState: React.FC = observer((props) => { const [moduleIssuesListModal, setModuleIssuesListModal] = useState(false); // store hooks const { issues } = useIssues(EIssuesStoreType.MODULE); - const { updateIssue, fetchIssue } = useIssueDetail(); const { commandPalette: { toggleCreateIssueModal }, diff --git a/web/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx b/web/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx index a5667f99d..54df6ca24 100644 --- a/web/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx +++ b/web/components/issues/issue-layouts/spreadsheet/base-spreadsheet-root.tsx @@ -97,6 +97,7 @@ export const BaseSpreadsheetRoot = observer((props: IBaseSpreadsheetRoot) => { portalElement={portalElement} /> ), + // eslint-disable-next-line react-hooks/exhaustive-deps [handleIssues] ); diff --git a/web/components/issues/issue-modal/form.tsx b/web/components/issues/issue-modal/form.tsx index 703a9783f..31cb9dd66 100644 --- a/web/components/issues/issue-modal/form.tsx +++ b/web/components/issues/issue-modal/form.tsx @@ -132,6 +132,7 @@ export const IssueFormRoot: FC = observer((props) => { parent_id: formData.parent_id, }); } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [projectId]); const issueName = watch("name"); diff --git a/web/lib/app-provider.tsx b/web/lib/app-provider.tsx index 027800cd8..dad6253c9 100644 --- a/web/lib/app-provider.tsx +++ b/web/lib/app-provider.tsx @@ -47,7 +47,7 @@ export const AppProvider: FC = observer((props) => { - {/* = observer((props) => { posthogHost={envConfig?.posthog_host || null} > {children} - */} - {children} + diff --git a/web/lib/wrappers/posthog-wrapper.tsx b/web/lib/wrappers/posthog-wrapper.tsx index 6ce830517..f310f0c39 100644 --- a/web/lib/wrappers/posthog-wrapper.tsx +++ b/web/lib/wrappers/posthog-wrapper.tsx @@ -40,9 +40,9 @@ const PosthogWrapper: FC = (props) => { posthog.init(posthogAPIKey, { api_host: posthogHost || "https://app.posthog.com", // Enable debug mode in development - loaded: (posthog) => { - if (process.env.NODE_ENV === "development") posthog.debug(); - }, + // loaded: (posthog) => { + // if (process.env.NODE_ENV === "development") posthog.debug(); + // }, autocapture: false, capture_pageview: false, // Disable automatic pageview capture, as we capture manually });