import { Drawer, rem } from "@mantine/core"; import ExcelDropzone from "../../../../components/ExcelDropzone/ExcelDropzone.tsx"; import styles from "../PrefillDealWithExcelDrawer/PrefillDealsWithExcelDrawer.module.css"; import { usePrefillDealsWithExcelContext } from "../../contexts/PrefillDealsWithExcelContext.tsx"; import ProductsPreview from "./components/ProductsPreview.tsx"; import { BoardSchema } from "../../../../client"; type Props = { board: BoardSchema | null; } const PrefillDealsWithExcelDrawer = ({ board }: Props) => { const { prefillWithExcelOpened, prefillWithExcelOnClose, barcodeProductsMap, onDrop, excelDropzone, } = usePrefillDealsWithExcelContext(); const getBody = () => { if (!board || board.dealStatuses.length === 0) return; if (barcodeProductsMap?.size === 0) { return ; } return ; }; return (
{getBody()}
); }; export default PrefillDealsWithExcelDrawer;