fix: build fixes

This commit is contained in:
sriram veeraghanta
2024-02-05 13:28:24 +05:30
parent b210e1014e
commit e15531c044
2 changed files with 8 additions and 9 deletions

View File

@@ -1,7 +1,8 @@
import { FC, Fragment, useState } from "react";
import { Dialog, Transition, Tab } from "@headlessui/react";
import { CheckCircle } from "lucide-react";
import { useApplication } from "hooks/store";
// store
import { useEventTracker } from "hooks/store";
function classNames(...classes: any[]) {
return classes.filter(Boolean).join(" ");
@@ -35,9 +36,7 @@ export type ProPlanModalProps = {
export const ProPlanModal: FC<ProPlanModalProps> = (props) => {
const { isOpen, handleClose } = props;
// store
const {
eventTracker: { captureEvent },
} = useApplication();
const { captureEvent } = useEventTracker();
// states
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [tabIndex, setTabIndex] = useState(0);
@@ -45,14 +44,14 @@ export const ProPlanModal: FC<ProPlanModalProps> = (props) => {
const handleProPlaneMonthRedirection = () => {
if (process.env.NEXT_PUBLIC_PRO_PLAN_MONTHLY_REDIRECT_URL) {
window.open(process.env.NEXT_PUBLIC_PRO_PLAN_MONTHLY_REDIRECT_URL, "_blank");
captureEvent("pro_plan_modal_month_redirection");
captureEvent("pro_plan_modal_month_redirection", {});
}
};
const handleProPlanYearlyRedirection = () => {
if (process.env.NEXT_PUBLIC_PRO_PLAN_YEARLY_REDIRECT_URL) {
window.open(process.env.NEXT_PUBLIC_PRO_PLAN_YEARLY_REDIRECT_URL, "_blank");
captureEvent("pro_plan_modal_yearly_redirection");
captureEvent("pro_plan_modal_yearly_redirection", {});
}
};

View File

@@ -3,7 +3,7 @@ import Link from "next/link";
import { Transition } from "@headlessui/react";
import { observer } from "mobx-react-lite";
// hooks
import { useApplication } from "hooks/store";
import { useApplication, useEventTracker } from "hooks/store";
import useOutsideClickDetector from "hooks/use-outside-click-detector";
// icons
import { FileText, HelpCircle, MessagesSquare, MoveLeft, Zap } from "lucide-react";
@@ -48,8 +48,8 @@ export const WorkspaceHelpSection: React.FC<WorkspaceHelpSectionProps> = observe
const {
theme: { sidebarCollapsed, toggleSidebar },
commandPalette: { toggleShortcutModal },
eventTracker: { captureEvent },
} = useApplication();
const { captureEvent } = useEventTracker();
// states
const [isNeedHelpOpen, setIsNeedHelpOpen] = useState(false);
// refs
@@ -61,7 +61,7 @@ export const WorkspaceHelpSection: React.FC<WorkspaceHelpSectionProps> = observe
const handleProPlanModalOpen = () => {
setIsProPlanModalOpen(true);
captureEvent("pro_plan_modal_opened");
captureEvent("pro_plan_modal_opened", {});
};
return (