Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove attributes section if no product attributes
dominik-zeglencac9869501f4
diff --git a/saleor/static/dashboard-next/products/components/ProductOrganization/ProductOrganization.tsx b/saleor/static/dashboard-next/products/components/ProductOrganization/ProductOrganization.tsxindex e6d9af06a6..ee2f34dafa 100644--- a/saleor/static/dashboard-next/products/components/ProductOrganization/ProductOrganization.tsx+++ b/saleor/static/dashboard-next/products/components/ProductOrganization/ProductOrganization.tsx@@ -206,9 +206,13 @@ const ProductOrganization = withStyles(styles, { name: "ProductOrganization" })(}onChange={onChange}/>- <Typography className={classes.cardSubtitle}>- {i18n.t("Attributes")}- </Typography>+ {!(data && data.attributes && data.attributes.length === 0) ? (+ <Typography className={classes.cardSubtitle}>+ {i18n.t("Attributes")}+ </Typography>+ ) : (+ <FormSpacer />+ )}{data.attributes ? (data.attributes.map((item, index) => {return (