import * as React from 'react'; import PropTypes from 'prop-types'; import { TableBody, TableCell, TableRow } from '@/components/ui/Rocket/Table/Table'; import { Skeleton } from '@/components/ui/Rocket/Skeleton/Skeleton'; /** * Generic table skeleton — renders pulsing placeholder rows. * Designed to be used inside a `` while data is loading, * replacing the real ``. */ function TableSkeleton({ rowCount = 5, columnCount = 4 }) { const rows = React.useMemo( () => Array.from({ length: rowCount }, (_, i) => ({ id: `table-skeleton-${i}` })), [rowCount] ); return ( {rows.map((row) => ( {Array.from({ length: columnCount }, (_, colIndex) => ( ))} ))} ); } TableSkeleton.displayName = 'TableSkeleton'; TableSkeleton.propTypes = { rowCount: PropTypes.number, columnCount: PropTypes.number, }; export { TableSkeleton };