print added

This commit is contained in:
Samandar Turg'unboev
2025-06-25 17:21:24 +05:00
parent c04c8a74b2
commit 50da2a139a
2 changed files with 4 additions and 2 deletions

View File

@@ -33,9 +33,10 @@ interface BoxesPrintProps {
weight: number;
}>;
};
key: number | string;
}
const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData }, ref) => {
const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData, key }, ref) => {
return (
<Box
ref={ref}
@@ -51,6 +52,7 @@ const BoxesPrint = forwardRef<HTMLDivElement, BoxesPrintProps>(({ boxData }, ref
height: '100mm',
},
}}
key={key}
>
<Box sx={{ border: '1px solid black' }}>
<Box sx={{ display: 'flex', justifyContent: 'space-between' }}>

View File

@@ -20,7 +20,7 @@ const BoxesPrintList = forwardRef<HTMLDivElement, BoxesPrintListProps>(({ boxDat
<div ref={ref}>
{productsChunks.map((chunk, index) => (
<div key={index} style={{ pageBreakAfter: 'always' }}>
<BoxesPrint boxData={{ ...boxData, products_list: chunk }} />
<BoxesPrint boxData={{ ...boxData, products_list: chunk }} key={index} />
</div>
))}
</div>