Untitled

mail@pastecode.io avatar
unknown
javascript
7 months ago
855 B
5
Indexable
Never
import React from "react";
import { Stack, Box, Accordion } from "@chakra-ui/react";
import InventoryCard from "./InventoryCard";

const InventoryBody = ({
  userCatalogue,
  updateCatalogueAfterDelete,
  updateCatalogueAfterPatch,
}) => {
  return (
    <Box
      display={"flex"}
      justifyContent={"center"}
      className="overflow-y-auto hover:overflow-scroll"
    >
      <Stack>
        <Accordion allowToggle>
          {userCatalogue.map((item) => {
            return (
              <InventoryCard
                key={item.id}
                itemToDisplay={item}
                updateCatalogueAfterDelete={updateCatalogueAfterDelete}
                updateCatalogueAfterPatch={updateCatalogueAfterPatch}
              />
            );
          })}
        </Accordion>
      </Stack>
    </Box>
  );
};

export default InventoryBody;