import { Alert, AlertDescription } from '@documenso/ui/primitives/alert'; import { Button } from '@documenso/ui/primitives/button'; import { Trans } from '@lingui/react/macro'; import { useState } from 'react'; export type AnalyticsQueryErrorProps = { onRetry: () => Promise; className?: string; }; export const AnalyticsQueryError = ({ onRetry, className }: AnalyticsQueryErrorProps) => { const [isRetrying, setIsRetrying] = useState(false); const handleRetry = async () => { setIsRetrying(true); try { await onRetry(); } finally { setIsRetrying(false); } }; return ( This data could not be loaded. ); };