Skip to main content

SyncProgressList

Render progress reported by AppleHealthSync or AndroidHealthSync. The component displays a label, localized status, completed-versus-total count, and a progress bar for each populated entry.

import { SyncProgressList } from "@ovok/native/data-sync";

<SyncProgressList
progress={progress}
labelForType={(type) => measurementLabels[type] ?? type}
statusLabels={{ syncing: "Importing", completed: "Imported" }}
reasonLabels={{ offline: "No connection", "wifi-only": "Waiting for Wi-Fi" }}
/>;

Props​

PropDescription
progressPartial map of string keys to SyncProgress, or null/undefined.
labelForTypeConvert a key to display text. Defaults to the SDK translation key tile.<key>.label.
statusLabelsOverride labels for idle, started, syncing, paused, failed, or completed.
reasonLabelsOverride offline and wifi-only pause labels.
TextReplace the React Native Paper Text component.

When progress is empty or unset, the component renders an empty container. Supply your own empty state if the screen needs one.

Progress shape​

SyncProgress contains:

  • measurementTypeKey: the key configured in dataToSync;
  • status: idle, started, syncing, paused, failed, or completed;
  • optional reason: offline or wifi-only when paused;
  • optional progress: done, total, and created observation counts.

The list displays done and total; read created from the progress map when the screen needs to distinguish new observations from matched records. Status and reason labels fall back to the SDK's i18n strings and the raw reason value, respectively.