2022-06-24 09:52:57 -07:00
|
|
|
/** Sets the ServiceWorker updating state. */
|
2024-08-11 01:48:58 -07:00
|
|
|
const SW_UPDATING = 'SW_UPDATING' as const;
|
2022-06-24 09:52:57 -07:00
|
|
|
|
|
|
|
/** Dispatch when the ServiceWorker is being updated to display a loading screen. */
|
2024-08-11 01:48:58 -07:00
|
|
|
const setSwUpdating = (isUpdating: boolean) => ({
|
2022-06-24 09:52:57 -07:00
|
|
|
type: SW_UPDATING,
|
|
|
|
isUpdating,
|
|
|
|
});
|
|
|
|
|
2024-08-11 01:48:58 -07:00
|
|
|
type SwAction = ReturnType<typeof setSwUpdating>;
|
|
|
|
|
2022-06-24 09:52:57 -07:00
|
|
|
export {
|
|
|
|
SW_UPDATING,
|
|
|
|
setSwUpdating,
|
2024-08-11 01:48:58 -07:00
|
|
|
type SwAction,
|
2022-06-24 09:52:57 -07:00
|
|
|
};
|