'use client'; import { useTranslations } from 'next-intl'; import { useSyncState } from './sync-provider'; export function SyncChip() { const t = useTranslations('sync'); const { pendingCount, deadLetterCount } = useSyncState(); if (deadLetterCount > 0) { return (
{t('deadLetters', { count: deadLetterCount })}
); } if (pendingCount > 0) { return (
{t('pending', { count: pendingCount })}
); } return (
{t('synced')}
); }