Commit 7f64cfab by jaymehta

.

1 parent 9794cb28
......@@ -24,6 +24,7 @@ const GuestReviews = ({ activityById }) => {
const router = useRouter();
console.log("reviews", reviews);
const handleRatingChange = newRating => {
console.log("newRating", newRating);
setRating(newRating);
};
......@@ -108,19 +109,21 @@ const GuestReviews = ({ activityById }) => {
name="rating"
starDimension="20px" // Set star width and height
/>
<div className="review-content">
"{data.attributes?.comments?.length > 180 ? `${data?.attributes?.comments.slice(0, 180)}...` : data?.attributes?.comments}"
{data?.attributes?.comments?.length > 180 && (
<a
onClick={() => {
setreadMoreText(data);
setshowModal(true);
}}
>
Read More
</a>
)}
</div>
{data.attributes?.comments && (
<div className="review-content">
"{data.attributes?.comments?.length > 180 ? `${data?.attributes?.comments.slice(0, 180)}...` : data?.attributes?.comments}"
{data?.attributes?.comments?.length > 180 && (
<a
onClick={() => {
setreadMoreText(data);
setshowModal(true);
}}
>
Read More
</a>
)}
</div>
)}
{/* View All */}
</div>
</motion.div>
......@@ -144,7 +147,7 @@ const GuestReviews = ({ activityById }) => {
<label className=" mb-3 ">Rating: </label>{" "}
<StarRatings
className="col-3 mx-2"
rating={3}
rating={rating}
starRatedColor="#FFD600" // Set the rated color to yellow
starHoverColor="#ffe20" // Set the hover color to yellow
changeRating={handleRatingChange}
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!