-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: rating bugs & text modifs #60
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -57,8 +57,8 @@ export default function Home() { | |||
const { checkLoginFlow } = useAuth(); | |||
const { address, chainId } = useAccount(); | |||
|
|||
const [rating1, setRating1] = useState<number>(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default value for stars must be null
and if users don't rate a project, it should be sent as null
to our backend server.
app/comparison/[category]/page.tsx
Outdated
@@ -326,8 +327,8 @@ export default function Home() { | |||
data: { | |||
project1Id: project1!.id, | |||
project2Id: project2!.id, | |||
project1Stars: rating1, | |||
project2Stars: rating2, | |||
project1Stars: rating1 || 3, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, it shouldn't be sent as a 3
to the backend if it's a null
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keep the rating as null
at every stage and just show it as a 0 in Line 546. (something like: rating1 === null ? 0 : rating1
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MoeNick mentioned that it still should be sent as 3 as default to backend if it's null.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems @mmahdigh is right @Meriem-BM
If user don’t star, and the project shows up again, it should be grayed out.
Seems the default 3 star is not set in backends but calculated at last step.
Thanks
I made those modifications @mmahdigh, you can re-review it |
Related #53 #54 #58 #55 #59 #39