harden report references in boards
This commit is contained in:
1 parent
a4a0167515
commit
7bdc2f215e
8 files changed
+346
-10
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { Text } from '@umami/react-zen';
|
||||
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { Link2Off } from '@/components/icons';
|
||||
import { useReportQuery } from '@/components/hooks/queries/useReportQuery';
|
||||
import { Funnel } from './Funnel';
|
||||
|
||||
@@ -9,7 +10,11 @@ export function BoardFunnel({ websiteId, reportId }: { websiteId: string; report
|
||||
|
||||
if (!reportId) {
|
||||
return (
|
||||
<EmptyPlaceholder title="Select a saved funnel" description="Choose an existing funnel." />
|
||||
<EmptyPlaceholder
|
||||
icon={<Link2Off />}
|
||||
title="Reconnect funnel"
|
||||
description="Choose a funnel for this website."
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ import { Text } from '@umami/react-zen';
|
||||
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
|
||||
import { LoadingPanel } from '@/components/common/LoadingPanel';
|
||||
import { useDateRange } from '@/components/hooks';
|
||||
import { Link2Off } from '@/components/icons';
|
||||
import { useReportQuery } from '@/components/hooks/queries/useReportQuery';
|
||||
import { Goal } from './Goal';
|
||||
|
||||
@@ -12,7 +13,13 @@ export function BoardGoal({ websiteId, reportId }: { websiteId: string; reportId
|
||||
const { data, isLoading, error, isFetching } = useReportQuery(reportId || '');
|
||||
|
||||
if (!reportId) {
|
||||
return <EmptyPlaceholder title="Select a saved goal" description="Choose an existing goal." />;
|
||||
return (
|
||||
<EmptyPlaceholder
|
||||
icon={<Link2Off />}
|
||||
title="Reconnect goal"
|
||||
description="Choose a goal for this website."
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
if (data && (data.type !== 'goal' || data.websiteId !== websiteId)) {
|
||||
|
||||
Reference in new issue
Block a user