lbry-desktop/ui/component/loadingBarOneOff/view.jsx

19 lines
449 B
React
Raw Normal View History

// @flow
import * as React from 'react';
import { LOADING_BAR_COLOR } from 'config';
import LoadingBar from 'react-top-loading-bar';
function LoadingBarOneOff(props: any) {
const loadingBarRef = React.useRef(null);
React.useEffect(() => {
if (loadingBarRef.current) {
loadingBarRef.current.continuousStart();
}
}, []);
return <LoadingBar color={LOADING_BAR_COLOR} ref={loadingBarRef} />;
}
export default LoadingBarOneOff;