Files
karma/ui/src/Components/FetchPauser/index.tsx
2020-07-17 11:58:41 +01:00

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 };