-
-
Notifications
You must be signed in to change notification settings - Fork 184
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
like function implemented #68
Conversation
Sorry, I'm unavailable atm, but would review as soon as I'm back |
It's okay @mathiasayivor |
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.
What's the purpose of this though?
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.
@prateek565 I've left some comments on the changes, but in summary:
- Replace
user.email
withuser.id
since users can update their emails at any point in time - Avoid mutating component props directly; Clone/copy the prop first
- Use updater functions to make updates reliable
- Re-structure Post.jsx props
Okay i will get it done by today. Thanks for feedback |
Hi @mathiasayivor I have implemented all the mentioned changes except |
Using an updating function in this context is important IMO since likes can be updated unpredictably
LGTM! Great job @prateek565! |
Yeah older posts cant be liked as they dont have likecount in their database . as i cant change database i have discussed this with @narayan954 he said he will remove older posts. This is what he said I have some cleanup to do i guess. Or you can have a condition for older post where post without likecount field wont be bothered while displaying likes |
Is it not possible to add fields to a firebase doc dynamically? |
I have no idea about that i know it can be done by admin who have acess to firestore |
Well, I think it's possible with |
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.
LGTM
Thanks a lot for your contribution :) |
Thanks I was able to learn a lot of new things with this project 😊. |
So good to hear that!! |
It was all due to @mathiasayivor , I am really thankful to him. |
fixes #41