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