presigned url
deploy to danak / build_and_deploy (push) Has been cancelled

This commit is contained in:
2026-07-10 20:08:31 +03:30
parent 7fd8b4c7e5
commit 7271ea8f21
26 changed files with 186 additions and 123 deletions
+1 -1
View File
@@ -56,7 +56,7 @@ const CreateProduct: FC = () => {
onSuccess: (data) => {
const imagesUrl: string[] = []
data.data?.map((item) => {
imagesUrl.push(item.url)
imagesUrl.push(item.key)
})
values.images = imagesUrl
handleSave(values)
+1 -1
View File
@@ -59,7 +59,7 @@ const UpdateProduct: FC = () => {
onSuccess: (data) => {
const imagesUrl: string[] = [...values.images]
data.data?.map((item) => {
imagesUrl.push(item.url)
imagesUrl.push(item.key)
})
values.images = imagesUrl
handleSave(values)
+1 -1
View File
@@ -58,7 +58,7 @@ const ProductCategory: FC = () => {
if (file) {
upload(file, {
onSuccess: (data) => {
values.avatarUrl = data?.data?.url
values.avatarUrl = data?.data?.key
handleSave(values)
}
})
+2 -1
View File
@@ -1,4 +1,5 @@
import { type FC, useMemo } from 'react'
import PresignedImage from '@/components/PresignedImage'
import { useDeleteCategory, useGetCategory } from '../hooks/useProductData'
import Table from '@/components/Table'
import type { ColumnType, RowDataType } from '@/components/types/TableTypes'
@@ -33,7 +34,7 @@ const CategoryList: FC = () => {
{
title: 'تصویر',
key: 'avatarUrl',
render: (item) => item.avatarUrl ? <img src={item.avatarUrl} className='w-14' alt={item.title} /> : '-'
render: (item) => item.avatarUrl ? <PresignedImage src={item.avatarUrl} className='w-14' alt={item.title} /> : '-'
},
{
title: 'عنوان',
+1 -1
View File
@@ -60,7 +60,7 @@ const UpdateCategory: FC = () => {
if (file) {
upload(file, {
onSuccess: (data) => {
values.avatarUrl = data?.data?.url
values.avatarUrl = data?.data?.key
handleSave(values)
}
})