Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

484 B
Raw Blame
// What the bar at the bottom says about unsent changes. Nothing while online with an empty outbox.
import { i18n } from '../i18n/index.tsx'
export type SyncState = { online: boolean; pending: number }

export function syncStatusText({ online, pending }: SyncState): string | null {
  const { t } = i18n()
  if (online) return pending ? t('shell.sync.syncing', { count: pending }) : null
  return pending ? t('shell.sync.offlineCount', { count: pending }) : t('shell.sync.offline')
}