Migrate to v2.10.2

This commit is contained in:
Ewen Le Bihan 2024-03-30 21:23:30 +01:00
parent 17c93dab31
commit 3eae82632f
3 changed files with 6 additions and 3 deletions

View file

@ -1,8 +1,8 @@
import WebsiteDetails from './WebsiteDetails'; import WebsiteDetails from './WebsiteDetails';
import { Metadata } from 'next'; import { Metadata } from 'next';
export default function WebsitePage({ params: { websiteId } }) { export default function WebsitePage({ params: { websiteId }, searchParams }) {
return <WebsiteDetails websiteId={websiteId} />; return <WebsiteDetails customDataFields={searchParams['fields']?.split(',') ?? []} websiteId={websiteId} />;
} }
export const metadata: Metadata = { export const metadata: Metadata = {

View file

@ -29,6 +29,7 @@ export interface MetricsTableProps extends ListTableProps {
onSearch?: (search: string) => void; onSearch?: (search: string) => void;
allowSearch?: boolean; allowSearch?: boolean;
children?: ReactNode; children?: ReactNode;
fieldName?: string
} }
export function MetricsTable({ export function MetricsTable({
@ -41,6 +42,7 @@ export function MetricsTable({
delay = null, delay = null,
allowSearch = false, allowSearch = false,
children, children,
fieldName,
...props ...props
}: MetricsTableProps) { }: MetricsTableProps) {
const [search, setSearch] = useState(''); const [search, setSearch] = useState('');
@ -70,6 +72,7 @@ export function MetricsTable({
city, city,
limit, limit,
search, search,
fieldName,
}, },
{ retryDelay: delay || DEFAULT_ANIMATION_DURATION, onDataLoad }, { retryDelay: delay || DEFAULT_ANIMATION_DURATION, onDataLoad },
); );

View file

@ -151,7 +151,7 @@ export default async (
return ok(res, data); return ok(res, data);
} else if (type === 'custom') { } else if (type === 'custom') {
const data = await getPageviewMetrics(websiteId, column, filters, limit, fieldName); const data = await getPageviewMetrics(websiteId, column, filters, limit, offset, fieldName);
return ok(res, data); return ok(res, data);
} }