diff --git a/src/app/(dashboard)/users/[id]/page.tsx b/src/app/(dashboard)/users/[id]/page.tsx index 571d748..1ecd925 100644 --- a/src/app/(dashboard)/users/[id]/page.tsx +++ b/src/app/(dashboard)/users/[id]/page.tsx @@ -13,6 +13,7 @@ import { Heart, Sparkles, Search, + Check, } from "lucide-react"; import { Card } from "@/components/ui/Card"; import { Avatar } from "@/components/ui/Avatar"; @@ -260,6 +261,15 @@ export default function UserReviewPage() { ); } +// دلایل رایج رد پروفایل — ادمین تیک می‌زنه، متن نهایی خودکار برای کاربر ساخته می‌شه +const COMMON_REASONS = [ + "عکس پروفایل نداره یا واضح نیست", + "اطلاعات پروفایل ناقصه", + "پروفایل به نظر جعلی یا ربات میاد", + "محتوای عکس‌ها نامناسبه", + "توی پروفایل شماره تماس یا لینک گذاشته", +]; + function RejectModal({ open, onClose, @@ -271,14 +281,25 @@ function RejectModal({ onConfirm: (reason: string) => void; loading: boolean; }) { - const [reason, setReason] = useState(""); + const [selected, setSelected] = useState([]); + const [extra, setExtra] = useState(""); useEffect(() => { - // eslint-disable-next-line react-hooks/set-state-in-effect - if (open) setReason(""); + if (open) { + // eslint-disable-next-line react-hooks/set-state-in-effect + setSelected([]); + setExtra(""); + } }, [open]); - const valid = reason.trim().length >= 3; + function toggle(text: string) { + setSelected((prev) => + prev.includes(text) ? prev.filter((t) => t !== text) : [...prev, text] + ); + } + + const finalReason = [...selected, extra.trim()].filter(Boolean).join("؛ "); + const valid = finalReason.length >= 3; return ( @@ -287,15 +308,49 @@ function RejectModal({ +
+ {COMMON_REASONS.map((text) => { + const checked = selected.includes(text); + return ( + + ); + })} +
+ + +
+