pleroma/src/actions/sw.ts
marcin mikołajczak fd5d8df503 WIP pl-api migration
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2024-08-16 09:06:13 +02:00

16 lines
378 B
TypeScript

/** Sets the ServiceWorker updating state. */
const SW_UPDATING = 'SW_UPDATING' as const;
/** Dispatch when the ServiceWorker is being updated to display a loading screen. */
const setSwUpdating = (isUpdating: boolean) => ({
type: SW_UPDATING,
isUpdating,
});
type SwAction = ReturnType<typeof setSwUpdating>;
export {
SW_UPDATING,
setSwUpdating,
type SwAction,
};