Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jay Mehta
/
zango-frontend
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Registry
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit 7f64cfab
authored
2024-07-15 15:29:27 +0530
by
jaymehta
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
.
1 parent
9794cb28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
components/detail/GuestReviews.js
components/detail/GuestReviews.js
View file @
7f64cfa
...
...
@@ -24,6 +24,7 @@ const GuestReviews = ({ activityById }) => {
const
router
=
useRouter
();
console
.
log
(
"reviews"
,
reviews
);
const
handleRatingChange
=
newRating
=>
{
console
.
log
(
"newRating"
,
newRating
);
setRating
(
newRating
);
};
...
...
@@ -108,6 +109,7 @@ const GuestReviews = ({ activityById }) => {
name
=
"rating"
starDimension
=
"20px"
// Set star width and height
/>
{
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
&&
(
...
...
@@ -121,6 +123,7 @@ const GuestReviews = ({ activityById }) => {
<
/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
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment