import { useParams } from 'common' import { Clock, ExternalLink, RefreshCw } from 'lucide-react' import Link from 'next/link' import { useRouter } from 'next/router' import { Button, cn } from 'ui' import { Admonition, TimestampInfo } from 'ui-patterns' import { GenericSkeletonLoader } from 'ui-patterns/ShimmeringLoader' import { parseEdgeFunctionEventMessage } from './EdgeFunctionRecentInvocations.utils' import { LOGS_TABLES } from '@/components/interfaces/Settings/Logs/Logs.constants' import useLogsPreview from '@/hooks/analytics/useLogsPreview' interface EdgeFunctionRecentInvocationsProps { functionId: string functionSlug: string } export const EdgeFunctionRecentInvocations = ({ functionId, functionSlug, }: EdgeFunctionRecentInvocationsProps) => { const { ref } = useParams() const router = useRouter() const { logData, isLoading, isSuccess, refresh } = useLogsPreview({ projectRef: ref as string, table: LOGS_TABLES.fn_edge, filterOverride: { function_id: functionId }, limit: 10, }) return (
Recent Invocations
Latest invocation requests for this function