import { DataTable, DataColumn, Icon, Row, Text } from '@umami/react-zen';
import { useFormat, useMessages, useNavigation } from '@/components/hooks';
import { Empty } from '@/components/common/Empty';
import { Avatar } from '@/components/common/Avatar';
import Link from 'next/link';
import { Eye } from '@/components/icons';
import { Lightning } from '@/components/svg';
import { DateDistance } from '@/components/common/DateDistance';
import { TypeIcon } from '@/components/common/TypeIcon';
export function EventsTable({ data = [] }) {
const { formatMessage, labels } = useMessages();
const { updateParams } = useNavigation();
const { formatValue } = useFormat();
if (data.length === 0) {
return ;
}
return (
{(row: any) => {
return (
{row.eventName ? : }
{formatMessage(row.eventName ? labels.triggeredEvent : labels.viewedPage)}
{row.eventName || row.urlPath}
);
}}
{(row: any) => (
{row.city ? `${row.city}, ` : ''} {formatValue(row.country, 'country')}
)}
{(row: any) => (
{formatValue(row.browser, 'browser')}
)}
{(row: any) => (
{formatValue(row.device, 'device')}
)}
{(row: any) => }
);
}