Closed gent1999 closed 1 week ago
Database Changes:
Renamed votes table to likes. Renamed votes column in the ideas table to likes. Updated SQL references in database setup scripts to reflect the renaming. Frontend Component Updates:
LikeButton.jsx: Changed component from VoteButton to LikeButton with a heart icon for like/unlike functionality. IdeasList.jsx: Updated to use LikeButton instead of VoteButton. LikedIdeas.jsx: Updated component to display ideas liked by the user, previously VotedIdeas. API Changes (api.js):
Renamed functions to reflect "like" terminology, e.g., voteForIdea to likeIdea, unvoteForIdea to unlikeIdea. Updated getVotedIdeas and similar functions to getLikedIdeas for consistency. Backend API Routes:
Updated endpoint routes to use "like" terminology, e.g., /like/:id and /unlike/:id. Modified backend logic to handle likes instead of votes, including changes to the likes table and corresponding functions. This list provides a concise overview of the changes for easier tracking and understanding.
Objective: Update the voting mechanism by changing the "Vote" button on ideas to a "Like" button to provide a more familiar and intuitive user experience.
Frontend:
Backend: