diff --git a/app/(admin)/reviews-moderation/page.tsx b/app/(admin)/reviews-moderation/page.tsx index 9c29e59..e069a6f 100644 --- a/app/(admin)/reviews-moderation/page.tsx +++ b/app/(admin)/reviews-moderation/page.tsx @@ -1,7 +1,7 @@ 'use client'; import { useMemo, useState, useEffect } from 'react'; -import { Star, RefreshCw, Search, ShieldCheck, Image as ImageIcon } from 'lucide-react'; +import { Star, RefreshCw, Search, ShieldCheck, Image as ImageIcon, ExternalLink, Package } from 'lucide-react'; import { toast } from 'sonner'; import { TablePagination, useClientPagination } from '@/components/ui/TablePagination'; import { adminService } from '@/services/api/adminService'; @@ -9,6 +9,9 @@ import { adminService } from '@/services/api/adminService'; interface ReviewItem { review_id: string; product_id: string; + product_name?: string; + product_slug?: string; + product_thumbnail?: string; author_name: string; author_email?: string; rating: number; @@ -161,7 +164,7 @@ export default function ReviewsModerationPage() {
| @@ -202,9 +210,35 @@ export default function ReviewsModerationPage() { )} |
-
- {rev.product_id}
-
+
+ {prodThumb ? (
+
+
+ )}
+
+
+ {rev.product_name || rev.product_id}
+
+ |
{renderStars(rev.rating)}
@@ -214,12 +248,30 @@ export default function ReviewsModerationPage() {
{rev.comment} {photos.length > 0 && (
- {photos.map((imgUrl, i) => (
-
-
)}
{rev.images.length > 0 && photos.length === 0 && (
|