Skip to content
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

Merged
merged 6 commits into from
Sep 29, 2024
Merged

Fix: rating bugs & text modifs #60

merged 6 commits into from
Sep 29, 2024

Conversation

Meriem-BM
Copy link
Member

@Meriem-BM Meriem-BM commented Sep 29, 2024

Related #53 #54 #58 #55 #59 #39

Copy link

vercel bot commented Sep 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
pairwise-rpgf5 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 29, 2024 0:37am

@Meriem-BM Meriem-BM requested a review from mmahdigh September 29, 2024 10:36
@Meriem-BM Meriem-BM changed the title Fix/rating bugs Fix: rating bugs & text modifs Sep 29, 2024
@Meriem-BM Meriem-BM requested a review from MoeNick September 29, 2024 10:37
@@ -57,8 +57,8 @@ export default function Home() {
const { checkLoginFlow } = useAuth();
const { address, chainId } = useAccount();

const [rating1, setRating1] = useState<number>(3);
Copy link
Collaborator

@mmahdigh mmahdigh Sep 29, 2024

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.

@@ -326,8 +327,8 @@ export default function Home() {
data: {
project1Id: project1!.id,
project2Id: project2!.id,
project1Stars: rating1,
project2Stars: rating2,
project1Stars: rating1 || 3,
Copy link
Collaborator

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

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the rating as nullat every stage and just show it as a 0 in Line 546. (something like: rating1 === null ? 0 : rating1)

Copy link
Member Author

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.

Copy link
Contributor

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

@Meriem-BM
Copy link
Member Author

I made those modifications @mmahdigh, you can re-review it

@mmahdigh mmahdigh merged commit b69eac7 into staging Sep 29, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants