-
-
Notifications
You must be signed in to change notification settings - Fork 145
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 class to show bookmarks colours #1177
Conversation
@CarolinaCobo is attempting to deploy a commit to the Codú Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe pull request includes modifications to the Changes
Possibly related PRs
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
components/ArticleMenu/ArticleMenu.tsx (1)
Line range hint
52-69
: Consider improving error handling for like/bookmark actions.The error handling is currently limited to console logging. Consider adding user feedback for failed actions to improve the user experience.
Here's a suggested implementation:
const likePost = async (postId: string, setLiked = true) => { if (likeStatus === "loading") return; try { await like({ postId, setLiked }); } catch (err) { - // @TODO handle error - console.error(err); + console.error('Failed to like post:', err); + // Show user feedback + toast.error('Failed to like post. Please try again.'); } }; const bookmarkPost = async (postId: string, setBookmarked = true) => { if (bookmarkStatus === "loading") return; try { await bookmark({ postId, setBookmarked }); } catch (err) { - // @TODO handle error - console.error(err); + console.error('Failed to bookmark post:', err); + // Show user feedback + toast.error('Failed to bookmark post. Please try again.'); } };Note: You'll need to import a toast notification library of your choice.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
- components/ArticleMenu/ArticleMenu.tsx (2 hunks)
- components/ArticlePreview/ArticlePreview.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
- components/ArticlePreview/ArticlePreview.tsx
🔇 Additional comments (2)
components/ArticleMenu/ArticleMenu.tsx (2)
Line range hint
142-147
: LGTM! HeartIcon styling is correct.The conditional color styling properly shows red for liked state and neutral for unliked state, which aligns with the PR objective.
Line range hint
165-170
: LGTM! BookmarkIcon styling is correct.The conditional color styling properly shows blue for bookmarked state and neutral for unbookmarked state, which directly addresses the PR objective.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
🌮 🦖
✨ Codu Pull Request 💻
Fixes #(issue)
Pull Request details
Any Breaking changes
None
Associated Screenshots