import React from 'react'; import { CopyButton } from '@/components/CopyButton'; import { useI18n } from '@/utils/chromeI18n'; import { cn } from '@/lib/utils'; interface ResultViewProps extends React.HTMLAttributes { result: string; showEmptyPlaceholder?: boolean; } export default function ResultView({ result, showEmptyPlaceholder = false, className, ...props }: ResultViewProps) { const { t } = useI18n('timestamp'); if (!result) { if (!showEmptyPlaceholder) return null; return (
{t('timestamp:resultEmpty')}
); } return (
{t('timestamp:resultLabel')}
{result}
); }