import { IS_GUEST } from "@utils/constants"; import { getCookie } from "@utils/cookie-tools"; import { useRouter } from "next/navigation"; export const ReviewButton = ({ setShowForm, className }: { setShowForm: () => void, className?: string }) => { const IsGuest = getCookie(IS_GUEST); const router = useRouter(); const handleAddReview = () => { if (IsGuest === "true" || IsGuest === null) { setShowForm(); // router.push("/customer/login"); } else { setShowForm(); } }; return ( ) }