chore: remove build warnings (#3534)

* chore: remove build warnings

* fix: posthog wrapper fixes

---------

Co-authored-by: sriram veeraghanta <veeraghanta.sriram@gmail.com>
This commit is contained in:
Aaryan Khandelwal 2024-02-01 14:53:08 +05:30 committed by GitHub
parent b0ad48e35a
commit 7d08a57be6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 9 additions and 9 deletions

View File

@ -157,6 +157,7 @@ export const GptAssistantPopover: React.FC<Props> = (props) => {
window.removeEventListener("keydown", handleEnterKeyPress); window.removeEventListener("keydown", handleEnterKeyPress);
window.removeEventListener("keydown", handleEscapeKeyPress); window.removeEventListener("keydown", handleEscapeKeyPress);
}; };
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isOpen, handleSubmit, onClose]); }, [isOpen, handleSubmit, onClose]);
const responseActionButton = response !== "" && ( const responseActionButton = response !== "" && (

View File

@ -7,7 +7,6 @@ import { useDashboard } from "hooks/store";
import { WidgetLoader } from "components/dashboard/widgets"; import { WidgetLoader } from "components/dashboard/widgets";
// helpers // helpers
import { renderFormattedPayloadDate } from "helpers/date-time.helper"; import { renderFormattedPayloadDate } from "helpers/date-time.helper";
import { cn } from "helpers/common.helper";
// types // types
import { TOverviewStatsWidgetResponse } from "@plane/types"; import { TOverviewStatsWidgetResponse } from "@plane/types";

View File

@ -2,7 +2,7 @@ import { useState } from "react";
import { observer } from "mobx-react-lite"; import { observer } from "mobx-react-lite";
import { PlusIcon } from "lucide-react"; import { PlusIcon } from "lucide-react";
// hooks // hooks
import { useApplication, useIssueDetail, useIssues, useUser } from "hooks/store"; import { useApplication, useIssues, useUser } from "hooks/store";
import useToast from "hooks/use-toast"; import useToast from "hooks/use-toast";
// components // components
import { EmptyState } from "components/common"; import { EmptyState } from "components/common";
@ -29,7 +29,6 @@ export const ModuleEmptyState: React.FC<Props> = observer((props) => {
const [moduleIssuesListModal, setModuleIssuesListModal] = useState(false); const [moduleIssuesListModal, setModuleIssuesListModal] = useState(false);
// store hooks // store hooks
const { issues } = useIssues(EIssuesStoreType.MODULE); const { issues } = useIssues(EIssuesStoreType.MODULE);
const { updateIssue, fetchIssue } = useIssueDetail();
const { const {
commandPalette: { toggleCreateIssueModal }, commandPalette: { toggleCreateIssueModal },

View File

@ -97,6 +97,7 @@ export const BaseSpreadsheetRoot = observer((props: IBaseSpreadsheetRoot) => {
portalElement={portalElement} portalElement={portalElement}
/> />
), ),
// eslint-disable-next-line react-hooks/exhaustive-deps
[handleIssues] [handleIssues]
); );

View File

@ -132,6 +132,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
parent_id: formData.parent_id, parent_id: formData.parent_id,
}); });
} }
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [projectId]); }, [projectId]);
const issueName = watch("name"); const issueName = watch("name");

View File

@ -47,7 +47,7 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
<InstanceLayout> <InstanceLayout>
<StoreWrapper> <StoreWrapper>
<CrispWrapper user={currentUser}> <CrispWrapper user={currentUser}>
{/* <PosthogWrapper <PosthogWrapper
user={currentUser} user={currentUser}
workspaceRole={currentWorkspaceRole} workspaceRole={currentWorkspaceRole}
projectRole={currentProjectRole} projectRole={currentProjectRole}
@ -55,8 +55,7 @@ export const AppProvider: FC<IAppProvider> = observer((props) => {
posthogHost={envConfig?.posthog_host || null} posthogHost={envConfig?.posthog_host || null}
> >
<SWRConfig value={SWR_CONFIG}>{children}</SWRConfig> <SWRConfig value={SWR_CONFIG}>{children}</SWRConfig>
</PosthogWrapper> */} </PosthogWrapper>
<SWRConfig value={SWR_CONFIG}>{children}</SWRConfig>
</CrispWrapper> </CrispWrapper>
</StoreWrapper> </StoreWrapper>
</InstanceLayout> </InstanceLayout>

View File

@ -40,9 +40,9 @@ const PosthogWrapper: FC<IPosthogWrapper> = (props) => {
posthog.init(posthogAPIKey, { posthog.init(posthogAPIKey, {
api_host: posthogHost || "https://app.posthog.com", api_host: posthogHost || "https://app.posthog.com",
// Enable debug mode in development // Enable debug mode in development
loaded: (posthog) => { // loaded: (posthog) => {
if (process.env.NODE_ENV === "development") posthog.debug(); // if (process.env.NODE_ENV === "development") posthog.debug();
}, // },
autocapture: false, autocapture: false,
capture_pageview: false, // Disable automatic pageview capture, as we capture manually capture_pageview: false, // Disable automatic pageview capture, as we capture manually
}); });