@@ -2,6 +2,7 @@ import { type FC } from 'react'
|
||||
import { useParams } from 'react-router-dom'
|
||||
import { useGetRequestDetails } from './hooks/useRequestData'
|
||||
import TicketSection from './components/TicketSection'
|
||||
import placeholderProductImage from '@/assets/images/placeholder-product.svg'
|
||||
|
||||
const RequestDetail: FC = () => {
|
||||
|
||||
@@ -25,12 +26,21 @@ const RequestDetail: FC = () => {
|
||||
<div className='flex flex-col gap-10'>
|
||||
{
|
||||
data?.data?.items?.map((item) => {
|
||||
const productImage = item.product?.images?.[0]
|
||||
|
||||
return (
|
||||
<div key={item.product.id}>
|
||||
<div className="flex items-center gap-6">
|
||||
{/* Product Image */}
|
||||
<div className='size-[86px] rounded-lg overflow-hidden'>
|
||||
<img src={item.product?.images?.[0]} className='size-full' />
|
||||
<div className='size-[86px] rounded-lg overflow-hidden bg-gray-100'>
|
||||
<img
|
||||
src={productImage || placeholderProductImage}
|
||||
alt={item.product?.title ?? 'محصول'}
|
||||
className='size-full object-cover'
|
||||
onError={(e) => {
|
||||
e.currentTarget.src = placeholderProductImage
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Order Details */}
|
||||
|
||||
Reference in New Issue
Block a user