"use client"; import AppContext from "@ctx/AppContext"; import { useRouter } from "next/navigation"; import { useContext } from "react"; import { BottomSheet } from "react-spring-bottom-sheet"; const BottomSheetComment = ({ handleCreateReview, name, content, setContent, handleStarClick, rate, }) => { const CTX = useContext(AppContext); const router = useRouter(); const renderStars = () => { return [...Array(5)].map((_, index) => { const value = index + 1; return ( handleStarClick(value)} xmlns="http://www.w3.org/2000/svg" fill={value <= rate ? "yellow" : "gray"} viewBox="0 0 24 24" strokeWidth={0.5} stroke="currentColor" className="w-8 h-8 cursor-pointer" > ); }); }; return ( CTX.setBottomSheetCommentOpen(false)} className={"z-50 relative "} > شما در حال اضافه کردن نظر برای {name} هستید دیدگاه خود را وارد کنید setContent(e.target.value)} value={content} /> امتیاز را انتخاب کنید {renderStars()} handleCreateReview()}> ارسال دیدگاه (برای ارسال دیدگاه ابتدا باید ورود کنید) ); }; export default BottomSheetComment;
شما در حال اضافه کردن نظر برای {name} هستید