1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(bug) do not display product sku if no set

This commit is contained in:
Sylvain 2022-09-27 12:33:13 +02:00
parent 18dc24e366
commit 768acf3c28

View File

@ -26,7 +26,7 @@ interface StoreProductProps {
}
/**
* This component shows a product
* This component shows the details of a single product, in full page
*/
export const StoreProduct: React.FC<StoreProductProps> = ({ productSlug, currentUser, onSuccess, onError }) => {
const { t } = useTranslation('public');
@ -129,7 +129,7 @@ export const StoreProduct: React.FC<StoreProductProps> = ({ productSlug, current
if (product) {
return (
<div className={`store-product ${statusColor(product) || ''}`}>
<span className='ref'>ref: {product.sku}</span>
{product.sku && <span className='ref'>{t('app.public.store_product.ref', { REF: product.sku })}</span>}
<h2 className='name'>{product.name}</h2>
<div className='gallery'>
<div className='main'>