All files / store/pages/Explore CardsLoader.tsx

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29        3x                       2x     16x                  
import { Row, Col } from "@canonical/react-components";
import { LoadingCard } from "@canonical/store-components";
import { v4 as uuidv4 } from "uuid";
 
const elementIds: string[] = Array.of(
  uuidv4(),
  uuidv4(),
  uuidv4(),
  uuidv4(),
  uuidv4(),
  uuidv4(),
  uuidv4(),
  uuidv4(),
);
 
function CardsLoader(): JSX.Element {
  return (
    <Row>
      {elementIds.map((id) => (
        <Col size={4} key={id}>
          <LoadingCard height={157} />
        </Col>
      ))}
    </Row>
  );
}
 
export default CardsLoader;