This commit is contained in:
hamid zarghami
2026-02-14 14:46:06 +03:30
parent 3b28f0ac42
commit eb67f767d7
3 changed files with 16 additions and 12 deletions
+8 -8
View File
@@ -99,11 +99,11 @@ const UploadBoxDraggble: FC<Props> = (props: Props) => {
)}>
{
perviews && perviews.map((item, index) => {
const imageSizeClass = props.imageSize === 'large'
? 'w-full h-32 rounded-lg'
const imageSizeClass = props.imageSize === 'large'
? 'w-full h-32 rounded-lg'
: props.imageSize === 'medium'
? 'size-20 rounded-lg'
: 'size-10 rounded-full'
? 'size-20 rounded-lg'
: 'size-10 rounded-full'
return (
<div key={index} className='flex items-center gap-2'>
<div key={index} className='flex relative items-center gap-2'>
@@ -141,11 +141,11 @@ const UploadBoxDraggble: FC<Props> = (props: Props) => {
)
}
else {
const imageSizeClass = props.imageSize === 'large'
? 'w-full h-32 rounded-lg'
const imageSizeClass = props.imageSize === 'large'
? 'w-full h-32 rounded-lg'
: props.imageSize === 'medium'
? 'size-20 rounded-lg'
: 'size-10 rounded-full'
? 'size-20 rounded-lg'
: 'size-10 rounded-full'
return (
<div key={index} className='flex items-center gap-2'>
<div key={index} className='flex relative items-center gap-2'>
+5 -1
View File
@@ -72,7 +72,11 @@ const UpdateProduct: FC = () => {
const allImages = [...values.images, ...newImageUrls]
const variants =
values.variants.length > 0
? values.variants
? values.variants.map((v) => ({
...(v.id && { id: v.id }),
value: v.value ?? '',
price: v.price ?? 0
}))
: [{ value: '', price: values.price }]
const productData: CreateProductType = {
...values,