Skip to main content

Function: applyStatusUpdateSnapshot()

applyStatusUpdateSnapshot(sites: Site[], statusUpdate: StatusUpdateSnapshotPayload): Site[]

Defined in: src/stores/sites/utils/statusUpdateSnapshot.ts:55

Applies an incoming status update snapshot to the current sites array.

Parametersโ€‹

sitesโ€‹

Site[]

statusUpdateโ€‹

StatusUpdateSnapshotPayload

Returnsโ€‹

Site[]

Remarksโ€‹

This function is pure and returns either the original sites reference (when no update can be applied) or a new array with the relevant monitor/site updated.