redirect url + accordion + blog + ...

This commit is contained in:
hamid zarghami
2025-04-21 12:09:01 +03:30
parent 486bf6a0a7
commit dbee916ad3
26 changed files with 452 additions and 103 deletions
+40 -33
View File
@@ -110,40 +110,47 @@ const DetailService: FC<{ id: string }> = ({ id }) => {
</div>
{
getDetailService.data?.data.danakService?.reviews?.map((item: ReviewItem) => {
return (
<div key={item.id} className='mt-5 border border-border rounded-3xl p-6'>
<div className='flex gap-2 items-center'>
<Image alt='avatar' width={24} height={24} src={item.user?.profilePic || defaultAvatar} className='size-6 rounded-full object-cover' />
<div className='text-description text-xs'>
{item.user?.firstName + ' ' + item.user?.lastName}
</div>
</div>
<div className='mt-4 flex justify-between'>
<div className='text-sm max-w-[70%] truncate'>
{item.title}
</div>
<div className='text-xs text-description'>
{moment(item.createdAt).fromNow()}
</div>
</div>
<div className='mt-2'>
<Rate
disabled
value={item.rating}
count={5}
style={{ fontSize: 14 }}
/>
</div>
<div className='mt-4 text-[11px] leading-6'>
{item.comment}
</div>
getDetailService.data?.data.danakService?.reviews?.length === 0 ?
<div className='flex justify-center items-center h-full mt-7'>
<div className='text-description text-sm'>
هیچ نظری ثبت نشده است
</div>
)
})
</div>
:
getDetailService.data?.data.danakService?.reviews?.map((item: ReviewItem) => {
return (
<div key={item.id} className='mt-5 border border-border rounded-3xl p-6'>
<div className='flex gap-2 items-center'>
<Image alt='avatar' width={24} height={24} src={item.user?.profilePic || defaultAvatar} className='size-6 rounded-full object-cover' />
<div className='text-description text-xs'>
{item.user?.firstName + ' ' + item.user?.lastName}
</div>
</div>
<div className='mt-4 flex justify-between'>
<div className='text-sm max-w-[70%] truncate'>
{item.title}
</div>
<div className='text-xs text-description'>
{moment(item.createdAt).fromNow()}
</div>
</div>
<div className='mt-2'>
<Rate
disabled
value={item.rating}
count={5}
style={{ fontSize: 14 }}
/>
</div>
<div className='mt-4 text-[11px] leading-6'>
{item.comment}
</div>
</div>
)
})
}
</div>
</div>