Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import { useMemo } from "react";
import { observer } from "mobx-react";
import { useRouter, useSearchParams } from "next/navigation";
import { useRouter } from "next/navigation";
// plane package imports
import { EUserPermissions, EUserPermissionsLevel } from "@plane/constants";
import { useTranslation } from "@plane/i18n";
import { Tabs } from "@plane/ui";
import { type TabItem, Tabs } from "@plane/ui";
// components
import AnalyticsFilterActions from "@/components/analytics/analytics-filter-actions";
import { PageHead } from "@/components/core";
Expand All @@ -19,6 +19,7 @@ import { getAnalyticsTabs } from "@/plane-web/components/analytics/tabs";
type Props = {
params: {
tabId: string;
workspaceSlug: string;
};
};

Expand Down Expand Up @@ -54,7 +55,7 @@ const AnalyticsPage = observer((props: Props) => {
? t(`workspace_analytics.page_label`, { workspace: currentWorkspace?.name })
: undefined;
const ANALYTICS_TABS = useMemo(() => getAnalyticsTabs(t), [t]);
const tabs = useMemo(
const tabs: TabItem[] = useMemo(
() =>
ANALYTICS_TABS.map((tab) => ({
key: tab.key,
Expand All @@ -63,7 +64,7 @@ const AnalyticsPage = observer((props: Props) => {
onClick: () => {
router.push(`/${currentWorkspace?.slug}/analytics/${tab.key}`);
},
isDisabled: tab.isDisabled,
disabled: tab.isDisabled,
})),
[ANALYTICS_TABS, router, currentWorkspace?.slug]
);
Expand Down