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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
components/detail/GuestReviews.js
components/detail/GuestReviews.js
View file @
7f64cfa
...
@@ -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
}
...
...
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