fix: replace alert() with toast notification in DeleteTodo#14
fix: replace alert() with toast notification in DeleteTodo#14jezweb wants to merge 1 commit intoifindev:mainfrom
Conversation
- Replace browser alert() with toast.error() for better UX - Import toast from react-hot-toast (already in dependencies) - Provides non-blocking, styled error notifications - Consistent with rest of application error handling
|
Warning Rate limit exceeded@jezweb has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 9 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Import react-hot-toast for consistent error feedback - Replace alert() with toast.error() on line 35 - Simplify error message to match other components - Consistent with PR ifindev#14 (delete-todo.tsx) Provides professional, non-blocking error notifications when toggling todo completion fails.
Problem
The
DeleteTodocomponent uses browseralert()for error messages (line 40-42), which:react-hot-toastinstalled but isn't using it hereSolution
Replace
alert()withtoast.error()from the already-imported toast library.Benefits
Testing
Changes
toastfrom react-hot-toastalert()withtoast.error()