import { h, Fragment } from 'preact';
import ActivityIndicator from '../components/ActivityIndicator';
import Heading from '../components/Heading';
import Link from '../components/Link';
import { FetchStatus, useApiHost, useEvent } from '../api';
import { Table, Thead, Tbody, Tfoot, Th, Tr, Td } from '../components/Table';
export default function Event({ eventId }) {
const apiHost = useApiHost();
const { data, status } = useEvent(eventId);
if (status !== FetchStatus.LOADED) {
return
Key | Value |
---|---|
Camera | {data.camera} |
Timeframe | {startime.toLocaleString()} – {endtime.toLocaleString()} |
Score | {(data.top_score * 100).toFixed(2)}% |
Zones | {data.zones.join(', ')} |
No clip available
)}