Resolved bug where the like button is not properly set when encountering a previous liked-post
Like button state now initializes based on if the post is in the user's likes
Optimized like button to only update its visual like count locally
The like is still sent to the backend, but it will not perform a GET to retrieve the exact number of likes
This improves performance since there are less API calls per action
Animated like button
The like button now changes color and pulses when liked/unliked
The animation works best if you're on a laptop and use the trackpad to tap since it is dependent on press duration
Animated other icons
The comments, map, and bookmark will now also pulse when interacted with
Updated icons
Icons for posts now use ones from FontAwesome. This is reflected in icon.ts
Portions of this code that utilized AI generation
None. However I consulted with ChatGPT to ask for opinions on adjusting the visual like count locally or from an API call. I opted to just do it locally since there was already a small stutter in animation with the API call.
This is related to issue #108
Description / Changes Made
Portions of this code that utilized AI generation
None. However I consulted with ChatGPT to ask for opinions on adjusting the visual like count locally or from an API call. I opted to just do it locally since there was already a small stutter in animation with the API call.
How to Test
Checklist