mirror of
https://github.com/makeplane/plane.git
synced 2026-02-08 15:08:43 -06:00
[WEB-4363] regression: analytics tabs improvements #7260
This commit is contained in:
committed by
GitHub
parent
79c2dfd293
commit
072f2e2cac
@@ -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";
|
||||
@@ -19,6 +19,7 @@ import { getAnalyticsTabs } from "@/plane-web/components/analytics/tabs";
|
||||
type Props = {
|
||||
params: {
|
||||
tabId: string;
|
||||
workspaceSlug: string;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -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,
|
||||
@@ -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]
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user