import { Skeleton, Table } from '@radix-ui/themes'; import { times } from 'lodash'; import { memo, useRef } from 'react'; import { useIntersection } from '../../../../hooks/useIntersection'; import { tankPerformanceSortTypeNamesArray } from '../../../../stores/tankPerformanceSort'; interface RowLoaderProps { onIntersection?: () => void; } export const RowLoader = memo(({ onIntersection }) => { const row = useRef(null); useIntersection(() => onIntersection?.(), row, { disabled: onIntersection === undefined, }); return ( {times(tankPerformanceSortTypeNamesArray.length, (index) => ( ))} ); });