fix: prevent Practice clear-all crash#162
Conversation
|
@Rajesh270712 is attempting to deploy a commit to the Kunal Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
🚀 PR Received SuccessfullyHello @Rajesh270712, Thank you for taking the initiative to contribute to this project. Please ensure that your PR follows all project guidelines properly before requesting review.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughThe ChangesClear All Filter Reset Bug Fix
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Summary
setDebouncedSearch("")call fromclearAllon the Practice page.Linked issue
Problem
Clicking Clear All can call
setDebouncedSearch, but that setter is not defined inPracticePage.jsx, causing aReferenceError.Fix
clearAllnow resets the sourcesearchQuerystate only. The existing debounced search effect then updatesdebouncedSearchthrough the normal path.Validation
npm cinpx eslint src/pages/PracticePage.jsxnpm run buildRisk notes
frontend/src/pages/PracticePage.jsx.PracticePage.jsxpasses.Summary by CodeRabbit