Commit 7f64cfab by jaymehta

.

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