From eb67f767d7156665d1eebb9613d3f8602ddbc656 Mon Sep 17 00:00:00 2001 From: hamid zarghami Date: Sat, 14 Feb 2026 14:46:06 +0330 Subject: [PATCH] update --- .env | 6 +++--- src/components/UploadBoxDraggble.tsx | 16 ++++++++-------- src/pages/product/Update.tsx | 6 +++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.env b/.env index b39dc6c..302600d 100644 --- a/.env +++ b/.env @@ -1,7 +1,7 @@ VITE_TOKEN_NAME = 'dmnu_a_t' VITE_REFRESH_TOKEN_NAME = 'dmnu-a-rt' -# VITE_BASE_URL = 'https://dmenuplus-api-production.dev.danakcorp.com' -VITE_BASE_URL = 'http://192.168.99.209:4000' +# VITE_BASE_URL = 'https://dkala-api.danakcorp.com' +VITE_BASE_URL = 'http://10.191.241.88:4000' -VITE_SOCKET_URL = 'https://dmenuplus-api-production.dev.danakcorp.com' \ No newline at end of file +VITE_SOCKET_URL = 'https://dkala-api.danakcorp.com' \ No newline at end of file diff --git a/src/components/UploadBoxDraggble.tsx b/src/components/UploadBoxDraggble.tsx index 00cd240..74655ba 100644 --- a/src/components/UploadBoxDraggble.tsx +++ b/src/components/UploadBoxDraggble.tsx @@ -99,11 +99,11 @@ const UploadBoxDraggble: FC = (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 (
@@ -141,11 +141,11 @@ const UploadBoxDraggble: FC = (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 (
diff --git a/src/pages/product/Update.tsx b/src/pages/product/Update.tsx index 0f60818..3995ee9 100644 --- a/src/pages/product/Update.tsx +++ b/src/pages/product/Update.tsx @@ -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,