import React , { useEffect } from 'react' ; import { DEFAULT_REFRESH_INTERVAL_MS } from '../../../../../../common/constants' ; import { useRefreshTransformList } from '../../../../common' ; export const useRefreshInterval = ( setBlockRefresh ) => { const { refresh } = useRefreshTransformList ( ) ; useEffect ( ( ) => { const interval = setInterval ( refresh , DEFAULT_REFRESH_INTERVAL_MS ) ; return ( ) => { clearInterval ( interval ) ; } ; } , [ ] ) ; } ;