use emptyplaceholder for gated message
This commit is contained in:
1 parent
cc16c3a49d
commit
3e201ebc94
2 files changed
+20
-12
No files matched your search
@@ -1,11 +1,12 @@
|
|||||||
'use client';
|
'use client';
|
||||||
import { SessionModal } from '@/app/(main)/websites/[websiteId]/sessions/SessionModal';
|
import { SessionModal } from '@/app/(main)/websites/[websiteId]/sessions/SessionModal';
|
||||||
import { WebsiteControls } from '@/app/(main)/websites/[websiteId]/WebsiteControls';
|
import { WebsiteControls } from '@/app/(main)/websites/[websiteId]/WebsiteControls';
|
||||||
|
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
|
||||||
import { Panel } from '@/components/common/Panel';
|
import { Panel } from '@/components/common/Panel';
|
||||||
import { useMessages, useSubscription, useWebsite } from '@/components/hooks';
|
import { useMessages, useSubscription, useWebsite } from '@/components/hooks';
|
||||||
import { Video } from '@/components/icons';
|
import { Video } from '@/components/icons';
|
||||||
import { getItem, setItem } from '@/lib/storage';
|
import { getItem, setItem } from '@/lib/storage';
|
||||||
import { Button, Column, Icon, Tab, TabList, TabPanel, Tabs, Text } from '@umami/react-zen';
|
import { Button, Column, Tab, TabList, TabPanel, Tabs } from '@umami/react-zen';
|
||||||
import { type Key, useState } from 'react';
|
import { type Key, useState } from 'react';
|
||||||
import { ReplayModal } from './ReplayModal';
|
import { ReplayModal } from './ReplayModal';
|
||||||
import { ReplaysDataTable } from './ReplaysDataTable';
|
import { ReplaysDataTable } from './ReplaysDataTable';
|
||||||
@@ -28,18 +29,18 @@ export function ReplaysPage({ websiteId }: { websiteId: string }) {
|
|||||||
return (
|
return (
|
||||||
<Column gap="3">
|
<Column gap="3">
|
||||||
<Panel>
|
<Panel>
|
||||||
<Column gap="4" alignItems="center" padding="10">
|
<EmptyPlaceholder
|
||||||
<Icon size="xl">
|
icon={<Video />}
|
||||||
<Video />
|
title={t(messages.upgradeRequired, { plan: 'Business' })}
|
||||||
</Icon>
|
description="Watch real user sessions to see exactly how visitors interact with your site."
|
||||||
<Text className="py-4">{t(messages.upgradeRequired, { plan: 'Business' })}</Text>
|
>
|
||||||
<Button
|
<Button
|
||||||
variant="primary"
|
variant="primary"
|
||||||
onPress={() => window.open(`${process.env.cloudUrl}/settings/billing`, '_blank')}
|
onPress={() => window.open(`${process.env.cloudUrl}/settings/billing`, '_blank')}
|
||||||
>
|
>
|
||||||
{t(labels.upgrade)}
|
{t(labels.upgrade)}
|
||||||
</Button>
|
</Button>
|
||||||
</Column>
|
</EmptyPlaceholder>
|
||||||
</Panel>
|
</Panel>
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
Slider,
|
Slider,
|
||||||
Switch,
|
Switch,
|
||||||
Text,
|
|
||||||
TextField,
|
TextField,
|
||||||
} from '@umami/react-zen';
|
} from '@umami/react-zen';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
import { EmptyPlaceholder } from '@/components/common/EmptyPlaceholder';
|
||||||
import { useMessages, useSubscription, useUpdateQuery, useWebsite } from '@/components/hooks';
|
import { useMessages, useSubscription, useUpdateQuery, useWebsite } from '@/components/hooks';
|
||||||
|
import { Video } from '@/components/icons';
|
||||||
|
|
||||||
interface ReplayConfig {
|
interface ReplayConfig {
|
||||||
sampleRate?: number;
|
sampleRate?: number;
|
||||||
@@ -81,12 +82,18 @@ export function WebsiteReplaySettings({ websiteId }: { websiteId: string }) {
|
|||||||
return (
|
return (
|
||||||
<Column gap="4">
|
<Column gap="4">
|
||||||
<Label>{t(labels.replays)}</Label>
|
<Label>{t(labels.replays)}</Label>
|
||||||
<Column gap="4" alignItems="center" padding="10">
|
<EmptyPlaceholder
|
||||||
<Text>{t(messages.upgradeRequired, { plan: 'Business' })}</Text>
|
icon={<Video />}
|
||||||
<Button variant="primary" onPress={() => window.open(`${process.env.cloudUrl}/settings/billing`, '_blank')}>
|
title={t(messages.upgradeRequired, { plan: 'Business' })}
|
||||||
|
description="Watch real user sessions to see exactly how visitors interact with your site."
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="primary"
|
||||||
|
onPress={() => window.open(`${process.env.cloudUrl}/settings/billing`, '_blank')}
|
||||||
|
>
|
||||||
{t(labels.upgrade)}
|
{t(labels.upgrade)}
|
||||||
</Button>
|
</Button>
|
||||||
</Column>
|
</EmptyPlaceholder>
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user