refactor: use successData from usePictoQuery in Home#987
Conversation
|
|
📝 WalkthroughWalkthroughThe pull request renames a destructured query variable from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)frontend/src/pages/Home/Home.tsx (2)
🔇 Additional comments (1)
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 |
|
|
|
This is a small refactor I noticed while reading through the Home page code, and it isn’t tied to an existing issue. |
While reading through the Home page implementation, I noticed that the component was accessing
data?.datadirectly even thoughusePictoQueryalready exposessuccessDatafor this purpose.This change updates the Home page to use
successDatainstead, which better aligns with the abstraction provided byusePictoQueryand avoids the need for explicit casting in the component.The behavior remains unchanged — images are still fetched, stored in Redux, and rendered in the gallery as before — but the code is now a bit cleaner and more consistent with the intended usage of the query hook.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.