Skip to main content

Function: applyStatusUpdateSnapshot()

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

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

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.