mirror of
https://github.com/prymitive/karma
synced 2026-05-21 04:33:07 +00:00
18 lines
379 B
TypeScript
18 lines
379 B
TypeScript
import { FC, ReactElement, useEffect } from "react";
|
|
|
|
import { AlertStore } from "Stores/AlertStore";
|
|
|
|
const FetchPauser: FC<{
|
|
children: ReactElement;
|
|
alertStore: AlertStore;
|
|
}> = ({ children, alertStore }) => {
|
|
useEffect(() => {
|
|
alertStore.status.pause();
|
|
return alertStore.status.resume;
|
|
}, [alertStore.status]);
|
|
|
|
return children;
|
|
};
|
|
|
|
export { FetchPauser };
|