feat: abstract API logic into reusable custom React hooks#2816
feat: abstract API logic into reusable custom React hooks#2816ArshVermaGit wants to merge 1 commit into
Conversation
|
@ArshVermaGit is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Warning Review limit reached
More reviews will be available in 16 minutes and 46 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ 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 |
This PR addresses the technical debt of scattered useEffect API calls by establishing a dedicated hooks infrastructure for the frontend. To ensure zero merge conflicts with concurrent feature development across other branches, this PR introduces the completed abstraction layer as entirely new, isolated files in Frontend/src/hooks/ (useTickets.js, useAuth.js, useCompany.js). These hooks securely wrap all Supabase initialization, query logic, state management (loading, error, data), and mutations (createTicket, updateCompany) into clean interfaces. This structural foundation perfectly separates business logic from UI components, allowing subsequent feature branches to progressively adopt the hooks without triggering massive git conflicts in existing active files.
Closes #2815