Merge branch 'dev' of https://github.com/umami-software/umami into dev
This commit is contained in:
commit
4aa5f8411e
23 files changed
+311
-216
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
TooltipTrigger,
|
||||
} from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { AdminNav } from '@/app/(main)/admin/AdminNav';
|
||||
import { SettingsNav } from '@/app/(main)/settings/SettingsNav';
|
||||
import { WebsiteNav } from '@/app/(main)/websites/[websiteId]/WebsiteNav';
|
||||
import { IconLabel } from '@/components/common/IconLabel';
|
||||
@@ -103,6 +104,8 @@ export function SideNav(props: any) {
|
||||
<WebsiteNav websiteId={websiteId} isCollapsed={isCollapsed} />
|
||||
) : pathname.includes('/settings') ? (
|
||||
<SettingsNav isCollapsed={isCollapsed} />
|
||||
) : pathname.includes('/admin') ? (
|
||||
<AdminNav />
|
||||
) : (
|
||||
<Column gap="2">
|
||||
{links.map(({ id, path, label, icon }) => {
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
'use client';
|
||||
import { Column, Grid } from '@umami/react-zen';
|
||||
import type { ReactNode } from 'react';
|
||||
import { PageBody } from '@/components/common/PageBody';
|
||||
import { useLoginQuery } from '@/components/hooks';
|
||||
import { AdminNav } from './AdminNav';
|
||||
|
||||
export function AdminLayout({ children }: { children: ReactNode }) {
|
||||
const { user } = useLoginQuery();
|
||||
@@ -12,21 +10,5 @@ export function AdminLayout({ children }: { children: ReactNode }) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Grid columns={{ base: '1fr', lg: 'auto 1fr' }} width="100%" height="100%">
|
||||
<Column
|
||||
display={{ base: 'none', lg: 'flex' }}
|
||||
width="240px"
|
||||
height="100%"
|
||||
border="right"
|
||||
marginRight="2"
|
||||
padding="3"
|
||||
>
|
||||
<AdminNav />
|
||||
</Column>
|
||||
<Column gap="6" margin="2">
|
||||
<PageBody>{children}</PageBody>
|
||||
</Column>
|
||||
</Grid>
|
||||
);
|
||||
return <PageBody>{children}</PageBody>;
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Column, Focusable, Row, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
import { IconLabel } from '@/components/common/IconLabel';
|
||||
import { NavMenu } from '@/components/common/NavMenu';
|
||||
import { useMessages, useNavigation } from '@/components/hooks';
|
||||
import { ArrowLeft, Globe, User, Users } from '@/components/icons';
|
||||
import { Column, Focusable, Row, Tooltip, TooltipTrigger } from '@umami/react-zen';
|
||||
import Link from 'next/link';
|
||||
|
||||
export function AdminNav({ onItemClick }: { onItemClick?: () => void }) {
|
||||
const { t, labels } = useMessages();
|
||||
@@ -41,7 +41,7 @@ export function AdminNav({ onItemClick }: { onItemClick?: () => void }) {
|
||||
|
||||
return (
|
||||
<Column gap="2">
|
||||
<Link href={renderUrl('/boards', false)} role="button" onClick={onItemClick}>
|
||||
<Link href={renderUrl('/websites', false)} role="button" onClick={onItemClick}>
|
||||
<TooltipTrigger delay={0}>
|
||||
<Focusable>
|
||||
<Row
|
||||
@@ -58,7 +58,6 @@ export function AdminNav({ onItemClick }: { onItemClick?: () => void }) {
|
||||
</Link>
|
||||
<NavMenu
|
||||
items={items}
|
||||
title={t(labels.admin)}
|
||||
selectedKey={selectedKey}
|
||||
allowMinimize={false}
|
||||
onItemClick={onItemClick}
|
||||
|
||||
@@ -1,12 +1,27 @@
|
||||
import { Icon, Row, Text } from '@umami/react-zen';
|
||||
import { Globe, Grid2x2, Link } from '@/components/icons';
|
||||
import { Favicon } from '@/components/common/Favicon';
|
||||
import { Grid2x2, Link } from '@/components/icons';
|
||||
import type { BoardEntityType } from '@/lib/boards';
|
||||
|
||||
export function BoardEntityBadge({ type, name }: { type: BoardEntityType; name: string }) {
|
||||
export function BoardEntityBadge({
|
||||
type,
|
||||
name,
|
||||
domain,
|
||||
}: {
|
||||
type: BoardEntityType;
|
||||
name: string;
|
||||
domain?: string;
|
||||
}) {
|
||||
return (
|
||||
<Row padding borderRadius="full" backgroundColor="surface-base" border gap="2">
|
||||
<Icon>
|
||||
{type === 'pixel' ? <Grid2x2 /> : type === 'link' ? <Link /> : <Globe />}
|
||||
{type === 'pixel' ? (
|
||||
<Grid2x2 />
|
||||
) : type === 'link' ? (
|
||||
<Link />
|
||||
) : (
|
||||
<Favicon domain={domain} />
|
||||
)}
|
||||
</Icon>
|
||||
<Text size="sm">{name}</Text>
|
||||
</Row>
|
||||
|
||||
@@ -6,9 +6,11 @@ import { getComponentDefinition } from '../boardComponentRegistry';
|
||||
function BoardComponentRendererComponent({
|
||||
config,
|
||||
websiteId,
|
||||
entityType,
|
||||
}: {
|
||||
config: BoardComponentConfig;
|
||||
websiteId?: string;
|
||||
entityType?: string;
|
||||
}) {
|
||||
const definition = getComponentDefinition(config.type);
|
||||
|
||||
@@ -20,7 +22,8 @@ function BoardComponentRendererComponent({
|
||||
);
|
||||
}
|
||||
|
||||
const Component = definition.component;
|
||||
const Component =
|
||||
(entityType && definition.componentByEntityType?.[entityType]) || definition.component;
|
||||
|
||||
if (!websiteId && definition.requiresWebsite !== false) {
|
||||
return (
|
||||
@@ -36,7 +39,9 @@ function BoardComponentRendererComponent({
|
||||
export const BoardComponentRenderer = memo(
|
||||
BoardComponentRendererComponent,
|
||||
(prevProps, nextProps) =>
|
||||
prevProps.websiteId === nextProps.websiteId && prevProps.config === nextProps.config,
|
||||
prevProps.websiteId === nextProps.websiteId &&
|
||||
prevProps.entityType === nextProps.entityType &&
|
||||
prevProps.config === nextProps.config,
|
||||
);
|
||||
|
||||
BoardComponentRenderer.displayName = 'BoardComponentRenderer';
|
||||
@@ -177,14 +177,16 @@ export function BoardComponentSelect({
|
||||
onSelect(config);
|
||||
};
|
||||
|
||||
const previewConfig: BoardComponentConfig | null = selectedDef
|
||||
? {
|
||||
type: selectedDef.type,
|
||||
title,
|
||||
description,
|
||||
props: { ...selectedDef.defaultProps, ...configValues },
|
||||
}
|
||||
: null;
|
||||
const previewConfig: BoardComponentConfig | null = useMemo(
|
||||
() =>
|
||||
selectedDef
|
||||
? {
|
||||
type: selectedDef.type,
|
||||
props: { ...selectedDef.defaultProps, ...configValues },
|
||||
}
|
||||
: null,
|
||||
[selectedDef, configValues],
|
||||
);
|
||||
|
||||
const canSave = !!selectedDef && isSelectedDefSupported && (!needsWebsite || !!resolvedEntityId);
|
||||
const availableDefinitions = useMemo(
|
||||
@@ -274,12 +276,16 @@ export function BoardComponentSelect({
|
||||
<Select
|
||||
value={String(configValues[field.name] ?? field.defaultValue ?? '')}
|
||||
onChange={(value: string) => handleConfigChange(field.name, value)}
|
||||
maxHeight={300}
|
||||
popoverProps={{ style: { width: 220 } }}
|
||||
>
|
||||
{field.options?.map(option => (
|
||||
<ListItem key={option.value} id={option.value}>
|
||||
{option.label}
|
||||
</ListItem>
|
||||
))}
|
||||
{(field.optionsByEntityType?.[activeEntityType] ?? field.options)?.map(
|
||||
option => (
|
||||
<ListItem key={option.value} id={option.value}>
|
||||
{option.label}
|
||||
</ListItem>
|
||||
),
|
||||
)}
|
||||
</Select>
|
||||
)}
|
||||
|
||||
@@ -364,7 +370,7 @@ export function BoardComponentSelect({
|
||||
<Text weight="bold">Preview</Text>
|
||||
<Column border="left" paddingLeft="4" height="100%" style={{ minWidth: 0 }}>
|
||||
{hasSelectedEntity && previewConfig && (!needsWebsite || resolvedEntityId) ? (
|
||||
<BoardComponentRenderer config={previewConfig} websiteId={resolvedEntityId} />
|
||||
<BoardComponentRenderer config={previewConfig} websiteId={resolvedEntityId} entityType={resolvedEntityType} />
|
||||
) : (
|
||||
<Column alignItems="center" justifyContent="center" height="100%">
|
||||
<Text color="muted">
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useBoard, useMessages, useNavigation } from '@/components/hooks';
|
||||
import { Pencil, Plus, X } from '@/components/icons';
|
||||
import { getBoardEntity, getBoardType, getResolvedComponentEntity } from '@/lib/boards';
|
||||
import type { BoardComponentConfig } from '@/lib/types';
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
@@ -10,11 +15,6 @@ import {
|
||||
TooltipTrigger,
|
||||
} from '@umami/react-zen';
|
||||
import { useMemo, useState } from 'react';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useBoard, useMessages, useNavigation } from '@/components/hooks';
|
||||
import { Pencil, Plus, X } from '@/components/icons';
|
||||
import { getBoardEntity, getBoardType, getResolvedComponentEntity } from '@/lib/boards';
|
||||
import type { BoardComponentConfig } from '@/lib/types';
|
||||
import { getComponentDefinition } from '../boardComponentRegistry';
|
||||
import { BoardComponentRenderer } from './BoardComponentRenderer';
|
||||
import { BoardComponentSelect } from './BoardComponentSelect';
|
||||
@@ -42,14 +42,14 @@ export function BoardEditColumn({
|
||||
const boardType = getBoardType(board);
|
||||
const { entityType: boardEntityType, entityId: boardEntityId } = getBoardEntity(board);
|
||||
const definition = component ? getComponentDefinition(component.type) : undefined;
|
||||
const { entityId } = getResolvedComponentEntity(board, component);
|
||||
const { entityType, entityId } = getResolvedComponentEntity(board, component);
|
||||
const renderedComponent = useMemo(() => {
|
||||
if (!component || (!entityId && definition?.requiresWebsite !== false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <BoardComponentRenderer config={component} websiteId={entityId} />;
|
||||
}, [component, definition?.requiresWebsite, entityId]);
|
||||
return <BoardComponentRenderer config={component} websiteId={entityId} entityType={entityType} />;
|
||||
}, [component, definition?.requiresWebsite, entityId, entityType]);
|
||||
|
||||
const handleSelect = (config: BoardComponentConfig) => {
|
||||
onSetComponent(id, config);
|
||||
@@ -79,7 +79,7 @@ export function BoardEditColumn({
|
||||
onMouseEnter={() => setShowActions(true)}
|
||||
onMouseLeave={() => setShowActions(false)}
|
||||
>
|
||||
{canEdit && canRemoveAction && showActions && (
|
||||
{canEdit && (showActions || !hasComponent) && (
|
||||
<Box
|
||||
position="absolute"
|
||||
top="50%"
|
||||
@@ -87,44 +87,39 @@ export function BoardEditColumn({
|
||||
zIndex={100}
|
||||
style={{ transform: 'translate(-50%, -50%)' }}
|
||||
>
|
||||
<Row gap="1" padding="2" borderRadius backgroundColor="surface-sunken">
|
||||
{hasComponent && (
|
||||
<TooltipTrigger delay={0}>
|
||||
<Button variant="outline" onPress={() => setShowSelect(true)}>
|
||||
<Icon size="sm">
|
||||
<Pencil />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Tooltip>{t(labels.edit)}</Tooltip>
|
||||
</TooltipTrigger>
|
||||
)}
|
||||
<Row
|
||||
gap="1"
|
||||
padding={hasComponent ? '2' : undefined}
|
||||
borderRadius={hasComponent || undefined}
|
||||
backgroundColor={hasComponent ? 'surface-sunken' : undefined}
|
||||
>
|
||||
<TooltipTrigger delay={0}>
|
||||
<Button variant="outline" onPress={handleRemove} isDisabled={!canRemoveAction}>
|
||||
<Button variant="outline" onPress={() => setShowSelect(true)}>
|
||||
<Icon size="sm">
|
||||
<X />
|
||||
{hasComponent ? <Pencil /> : <Plus />}
|
||||
</Icon>
|
||||
</Button>
|
||||
<Tooltip>{t(labels.remove)}</Tooltip>
|
||||
<Tooltip>{t(hasComponent ? labels.edit : labels.selectComponent)}</Tooltip>
|
||||
</TooltipTrigger>
|
||||
{canRemoveAction && (
|
||||
<TooltipTrigger delay={0}>
|
||||
<Button variant="outline" onPress={handleRemove}>
|
||||
<Icon size="sm">
|
||||
<X />
|
||||
</Icon>
|
||||
</Button>
|
||||
<Tooltip>{t(labels.remove)}</Tooltip>
|
||||
</TooltipTrigger>
|
||||
)}
|
||||
</Row>
|
||||
</Box>
|
||||
)}
|
||||
{renderedComponent ? (
|
||||
{renderedComponent && (
|
||||
<Column width="100%" height="100%" style={{ minHeight: 0 }}>
|
||||
<Box width="100%" flexGrow={1} overflow="auto" style={{ minHeight: 0 }}>
|
||||
{renderedComponent}
|
||||
</Box>
|
||||
</Column>
|
||||
) : (
|
||||
canEdit && (
|
||||
<Column width="100%" height="100%" alignItems="center" justifyContent="center">
|
||||
<Button variant="outline" onPress={() => setShowSelect(true)}>
|
||||
<Icon>
|
||||
<Plus />
|
||||
</Icon>
|
||||
</Button>
|
||||
</Column>
|
||||
)
|
||||
)}
|
||||
<Modal isOpen={showSelect} onOpenChange={setShowSelect}>
|
||||
<Dialog
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Box, Column } from '@umami/react-zen';
|
||||
import { Column, Heading, Row, Text } from '@umami/react-zen';
|
||||
import { Panel } from '@/components/common/Panel';
|
||||
import { useBoard } from '@/components/hooks';
|
||||
import { getBoardType, getResolvedComponentEntity, isOpenBoardType } from '@/lib/boards';
|
||||
@@ -28,17 +28,23 @@ export function BoardViewColumn({
|
||||
const title = component.title;
|
||||
const description = component.description;
|
||||
|
||||
const showBadge = showEntityBadge && isOpenBoardType(boardType) && !!entityBadge;
|
||||
|
||||
return (
|
||||
<Panel title={title} description={description} height="100%" position="relative">
|
||||
{showEntityBadge && isOpenBoardType(boardType) && entityBadge && (
|
||||
<Box position="absolute" top="12px" right="12px" zIndex={100}>
|
||||
<Panel height="100%">
|
||||
{showBadge ? (
|
||||
<Row justifyContent={title ? 'space-between' : 'flex-end'} alignItems="center">
|
||||
{title && <Heading>{title}</Heading>}
|
||||
<BoardEntityBadge {...entityBadge} />
|
||||
</Box>
|
||||
</Row>
|
||||
) : (
|
||||
title && <Heading>{title}</Heading>
|
||||
)}
|
||||
{description && <Text color="muted">{description}</Text>}
|
||||
<Column width="100%" height="100%" style={{ minHeight: 0 }}>
|
||||
<Box width="100%" flexGrow={1} style={{ minHeight: 0 }}>
|
||||
<BoardComponentRenderer config={component} websiteId={entityId} />
|
||||
</Box>
|
||||
<Column width="100%" flexGrow={1} style={{ minHeight: 0 }}>
|
||||
<BoardComponentRenderer config={component} websiteId={entityId} entityType={entityType} />
|
||||
</Column>
|
||||
</Column>
|
||||
</Panel>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import type { ComponentType } from 'react';
|
||||
import { TextBlock } from '@/app/(main)/boards/TextBlock';
|
||||
import { LinkMetricsBar } from '@/app/(main)/links/[linkId]/LinkMetricsBar';
|
||||
import { PixelMetricsBar } from '@/app/(main)/pixels/[pixelId]/PixelMetricsBar';
|
||||
import { WebsiteChart } from '@/app/(main)/websites/[websiteId]/WebsiteChart';
|
||||
import { WebsiteMetricsBar } from '@/app/(main)/websites/[websiteId]/WebsiteMetricsBar';
|
||||
import {
|
||||
@@ -15,12 +16,14 @@ import { EventsChart } from '@/components/metrics/EventsChart';
|
||||
import { MetricsTable } from '@/components/metrics/MetricsTable';
|
||||
import { WeeklyTraffic } from '@/components/metrics/WeeklyTraffic';
|
||||
import { WorldMap } from '@/components/metrics/WorldMap';
|
||||
import type { ComponentType } from 'react';
|
||||
|
||||
export interface ConfigField {
|
||||
name: string;
|
||||
label: string;
|
||||
type: 'select' | 'number' | 'text' | 'textarea';
|
||||
options?: { label: string; value: string }[];
|
||||
optionsByEntityType?: Record<string, { label: string; value: string }[]>;
|
||||
defaultValue?: any;
|
||||
}
|
||||
|
||||
@@ -31,6 +34,7 @@ export interface ComponentDefinition {
|
||||
category: string;
|
||||
icon: ComponentType<any>;
|
||||
component: ComponentType<any>;
|
||||
componentByEntityType?: Record<string, ComponentType<any>>;
|
||||
defaultProps?: Record<string, any>;
|
||||
configFields?: ConfigField[];
|
||||
requiresWebsite?: boolean;
|
||||
@@ -44,31 +48,60 @@ export const CATEGORIES = [
|
||||
] as const;
|
||||
|
||||
const METRIC_TYPES = [
|
||||
{ label: 'Pages', value: 'path' },
|
||||
{ label: 'Entry pages', value: 'entry' },
|
||||
{ label: 'Exit pages', value: 'exit' },
|
||||
{ label: 'Referrers', value: 'referrer' },
|
||||
{ label: 'Channels', value: 'channel' },
|
||||
{ label: 'Browsers', value: 'browser' },
|
||||
{ label: 'Path', value: 'path' },
|
||||
{ label: 'Entry page', value: 'entry' },
|
||||
{ label: 'Exit page', value: 'exit' },
|
||||
{ label: 'Title', value: 'title' },
|
||||
{ label: 'Query', value: 'query' },
|
||||
{ label: 'Referrer', value: 'referrer' },
|
||||
{ label: 'Channel', value: 'channel' },
|
||||
{ label: 'Country', value: 'country' },
|
||||
{ label: 'Region', value: 'region' },
|
||||
{ label: 'City', value: 'city' },
|
||||
{ label: 'Browser', value: 'browser' },
|
||||
{ label: 'OS', value: 'os' },
|
||||
{ label: 'Devices', value: 'device' },
|
||||
{ label: 'Countries', value: 'country' },
|
||||
{ label: 'Regions', value: 'region' },
|
||||
{ label: 'Cities', value: 'city' },
|
||||
{ label: 'Languages', value: 'language' },
|
||||
{ label: 'Screens', value: 'screen' },
|
||||
{ label: 'Query parameters', value: 'query' },
|
||||
{ label: 'Page titles', value: 'title' },
|
||||
{ label: 'Hosts', value: 'host' },
|
||||
{ label: 'Events', value: 'event' },
|
||||
{ label: 'Device', value: 'device' },
|
||||
{ label: 'Language', value: 'language' },
|
||||
{ label: 'Screen', value: 'screen' },
|
||||
{ label: 'UTM Source', value: 'utmSource' },
|
||||
{ label: 'UTM Medium', value: 'utmMedium' },
|
||||
{ label: 'UTM Campaign', value: 'utmCampaign' },
|
||||
{ label: 'UTM Content', value: 'utmContent' },
|
||||
{ label: 'UTM Term', value: 'utmTerm' },
|
||||
{ label: 'Event', value: 'event' },
|
||||
{ label: 'Hostname', value: 'hostname' },
|
||||
];
|
||||
|
||||
const PIXEL_LINK_METRIC_TYPES = METRIC_TYPES.filter(({ value }) =>
|
||||
[
|
||||
'referrer',
|
||||
'country',
|
||||
'region',
|
||||
'city',
|
||||
'browser',
|
||||
'os',
|
||||
'device',
|
||||
'query',
|
||||
'utmSource',
|
||||
'utmMedium',
|
||||
'utmCampaign',
|
||||
'utmContent',
|
||||
'utmTerm',
|
||||
].includes(value),
|
||||
);
|
||||
|
||||
const LIMIT_OPTIONS = [
|
||||
{ label: '5', value: '5' },
|
||||
{ label: '10', value: '10' },
|
||||
{ label: '20', value: '20' },
|
||||
];
|
||||
|
||||
const PixelMetricsBarAdapter = ({ websiteId }: { websiteId?: string }) =>
|
||||
websiteId ? <PixelMetricsBar pixelId={websiteId} /> : null;
|
||||
|
||||
const LinkMetricsBarAdapter = ({ websiteId }: { websiteId?: string }) =>
|
||||
websiteId ? <LinkMetricsBar linkId={websiteId} /> : null;
|
||||
|
||||
const componentDefinitions: ComponentDefinition[] = [
|
||||
// Overview
|
||||
{
|
||||
@@ -78,6 +111,10 @@ const componentDefinitions: ComponentDefinition[] = [
|
||||
category: 'overview',
|
||||
icon: PanelTop,
|
||||
component: WebsiteMetricsBar,
|
||||
componentByEntityType: {
|
||||
pixel: PixelMetricsBarAdapter,
|
||||
link: LinkMetricsBarAdapter,
|
||||
},
|
||||
},
|
||||
{
|
||||
type: 'WebsiteChart',
|
||||
@@ -103,6 +140,10 @@ const componentDefinitions: ComponentDefinition[] = [
|
||||
label: 'Metric type',
|
||||
type: 'select',
|
||||
options: METRIC_TYPES,
|
||||
optionsByEntityType: {
|
||||
pixel: PIXEL_LINK_METRIC_TYPES,
|
||||
link: PIXEL_LINK_METRIC_TYPES,
|
||||
},
|
||||
defaultValue: 'path',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ export function useBoardEntityBadgeProps(
|
||||
const { data: link } = useLinkQuery(enabled && entityType === 'link' ? entityId : undefined);
|
||||
|
||||
if (entityType === 'website' && website?.name) {
|
||||
return { type: entityType, name: website.name };
|
||||
return { type: entityType, name: website.name, domain: website.domain ?? undefined };
|
||||
}
|
||||
|
||||
if (entityType === 'pixel' && pixel?.name) {
|
||||
|
||||
@@ -14,7 +14,7 @@ export function LinkMetricsBar({
|
||||
}) {
|
||||
const { isAllTime } = useDateRange();
|
||||
const { t, labels } = useMessages();
|
||||
const { data, isLoading, isFetching, error } = useWebsiteStatsQuery(linkId);
|
||||
const { data, isLoading, isFetching, error } = useWebsiteStatsQuery({ websiteId: linkId });
|
||||
|
||||
const { pageviews, visitors, visits, comparison } = data || {};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export function PixelMetricsBar({
|
||||
}) {
|
||||
const { isAllTime } = useDateRange();
|
||||
const { t, labels } = useMessages();
|
||||
const { data, isLoading, isFetching, error } = useWebsiteStatsQuery(pixelId);
|
||||
const { data, isLoading, isFetching, error } = useWebsiteStatsQuery({ websiteId: pixelId });
|
||||
|
||||
const { pageviews, visitors, visits, comparison } = data || {};
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ export function SettingsNav({
|
||||
|
||||
return (
|
||||
<Column gap="2">
|
||||
<Link href={renderUrl('/boards', false)} role="button" onClick={onItemClick}>
|
||||
<Link href={renderUrl('/websites', false)} role="button" onClick={onItemClick}>
|
||||
<TooltipTrigger isDisabled={!isCollapsed} delay={0}>
|
||||
<Focusable>
|
||||
<Row
|
||||
|
||||
Reference in new issue
Block a user