fix(core-flows): shipping profile update (#11322)

**What**
- prevent unsetting shipping profile on product update
This commit is contained in:
Frane Polić
2025-02-05 15:37:43 +01:00
committed by GitHub
parent 5f7ff7f9f0
commit 742babfe3f
3 changed files with 90 additions and 15 deletions

View File

@@ -19,10 +19,6 @@ export const ProductShippingProfileSection = ({
const shippingProfile = product.shipping_profile
if (!shippingProfile) {
return null
}
return (
<Container className="p-0">
<div className="flex items-center justify-between px-6 py-4">
@@ -42,12 +38,14 @@ export const ProductShippingProfileSection = ({
/>
</div>
<SidebarLink
to={`/settings/locations/shipping-profiles/${shippingProfile.id}`}
labelKey={shippingProfile.name}
descriptionKey={shippingProfile.type}
icon={<ShoppingBag />}
/>
{shippingProfile && (
<SidebarLink
to={`/settings/locations/shipping-profiles/${shippingProfile.id}`}
labelKey={shippingProfile.name}
descriptionKey={shippingProfile.type}
icon={<ShoppingBag />}
/>
)}
</Container>
)
}