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
| Prop | Description |
|---|---|
progress | Partial map of string keys to SyncProgress, or null/undefined. |
labelForType | Convert a key to display text. Defaults to the SDK translation key tile.<key>.label. |
statusLabels | Override labels for idle, started, syncing, paused, failed, or completed. |
reasonLabels | Override offline and wifi-only pause labels. |
Text | Replace 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 indataToSync;status:idle,started,syncing,paused,failed, orcompleted;- optional
reason:offlineorwifi-onlywhen paused; - optional
progress:done,total, andcreatedobservation 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.