blob: 48d21c5737c993c2ab5b5e2ba37960586b3f4b45 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
import { Column, Grid, Label, Text } from '@umami/react-zen';
import { LoadingPanel } from '@/components/common/LoadingPanel';
import { useEventDataQuery } from '@/components/hooks';
export function EventData({ websiteId, eventId }: { websiteId: string; eventId: string }) {
const { data, isLoading, error } = useEventDataQuery(websiteId, eventId);
return (
<LoadingPanel isLoading={isLoading} error={error}>
<Grid columns="1fr 1fr" gap="5">
{data?.map(({ dataKey, stringValue }) => {
return (
<Column key={dataKey}>
<Label>{dataKey}</Label>
<Text>{stringValue}</Text>
</Column>
);
})}
</Grid>
</LoadingPanel>
);
}
|