products
unknown
javascript
2 years ago
2.6 kB
1
Indexable
Never
items.map((el) => { if (!el.products) return null const sumAccountProducts = el.products.reduce((previousValue, currentValue) => previousValue + currentValue.calculatedProductWhitespaceAmount, 0) return ( <tr className="hover:bg-gray-background h-8 border-b"> <td className={`pl-20 text-left whitespace-nowrap text-sm text-gray-700`}> {el.accountName}</td> <td className={`text-sm text-center text-gray-700 font-light px-6 whitespace-nowrap`}> <input className="h-4 w-4 border-gray-300 rounded text-indigo-600 focus:ring-indigo-500" type="checkbox" onChange={(e) => { handleChangeTargetInput(e); }} /> </td> {checkedWhitespaceState.map((state) => { if (state.key === "calculatedProductWhitespaceAmount") { return ( state.show && ( el.products.map((product) => { // console.log(product) return <ProductTam product={product} state={state} /> }) ) ) } })} </tr> ) })