2021-06-01 05:04:26 +02:00
|
|
|
// @flow
|
|
|
|
import * as React from 'react';
|
2021-06-29 14:54:54 +02:00
|
|
|
import { LOADING_BAR_COLOR } from 'config';
|
2021-06-01 05:04:26 +02:00
|
|
|
import LoadingBar from 'react-top-loading-bar';
|
|
|
|
|
|
|
|
function LoadingBarOneOff(props: any) {
|
|
|
|
const loadingBarRef = React.useRef(null);
|
|
|
|
|
|
|
|
React.useEffect(() => {
|
|
|
|
if (loadingBarRef.current) {
|
|
|
|
loadingBarRef.current.continuousStart();
|
|
|
|
}
|
|
|
|
}, []);
|
|
|
|
|
2021-06-29 14:54:54 +02:00
|
|
|
return <LoadingBar color={LOADING_BAR_COLOR} ref={loadingBarRef} />;
|
2021-06-01 05:04:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export default LoadingBarOneOff;
|