Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onAddFinish,
children,
isOneClickBuy,
shouldOpenMinicart,
setMinicartOpen,
showItemsPrice,
available: propAvailable,
skuItems: propSkuItems,
large: propLarge,
disabled: propDisabled,
shouldAddToCart,
customToastURL,
showTooltipOnSkuNotSelected,
checkoutVersion,
}) => {
const orderFormContext = useOrderForm()
const valuesFromContext = useProduct()
const isEmptyContext = !valuesFromContext || isEmpty(valuesFromContext)
const product = valuesFromContext && valuesFromContext.product
const selectedItem = valuesFromContext && valuesFromContext.selectedItem
const assemblyOptions = valuesFromContext && valuesFromContext.assemblyOptions
const selectedSeller = path(['selectedItem', 'sellers', 0], valuesFromContext)
const selectedQuantity =
valuesFromContext && valuesFromContext.selectedQuantity != null
? valuesFromContext.selectedQuantity
: 1
const skuItems =
isEmptyContext || propSkuItems != null
? propSkuItems