Engineervinay / threads-clone

Threads Clone
3 stars 2 forks source link

CSS for like button (CSS + little bit Reactjs required) #2

Closed Engineervinay closed 1 year ago

Engineervinay commented 1 year ago

If the thread is already liked then the like should be filled with the color red. we already have the user IDs of the users who liked the thread we just have to see if the current user ID is present in that likes array. if it is then display like as red color.

Jkayed commented 1 year ago

Hey, Vinay hope you're doing well!

do you still need help with this? If so I'd love to help!

Engineervinay commented 1 year ago

Hey @Yuroq Thank You I will assign this issue to you, Please message me if you have any doubt regarding project.

Jkayed commented 1 year ago

Sounds good, Thank you!

Engineervinay commented 1 year ago

Start json server first then start npm start in other terminal.

Jkayed commented 1 year ago

I started working on the dislike feature yesterday and got that done, I'm currently working on adding the color red if the user has liked the thread and removing the color once they dislike it. I'll update you once that is done!

Jkayed commented 1 year ago

Hey Vinay, so I tried to add the feature where the color of the heart turns to red on the SVG but for some reason when I try to change the color on the SVG the outline is the only thing that changes on the heart so instead I the hearts from "React-Icons" and that made everything work right. The heart changes to red on like, and back to normal when thread is unliked. Are you fine with me using the heart icon from react-icons instead of an SVG?

Engineervinay commented 1 year ago

Yeah, No problem you can add from react-icons

Jkayed commented 1 year ago

I just made the PR if you have any questions let me know!

Engineervinay commented 1 year ago

Thanks, @Yuroq Merged it.