refactor: extract reusable dashboard API hooks#1115
Conversation
|
@Rinki4738 is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
If you find DevTrack useful, a ⭐ star on the repo is always appreciated — it helps the project grow and attract more contributors!
|
Merge conflict after several PRs landed on main — likely on git fetch origin && git rebase origin/main
# resolve conflicts, then:
git push --force-with-leaseAll CI checks look good otherwise — once rebased this is ready to merge. |
8865585 to
52c7aa7
Compare
|
Rebased with the latest upstream/main changes, resolved merge conflicts, and updated the branch. All tests are passing locally now. Thanks! |
|
The refactor looks good, but adding the repo OAuth scope (giving full repo read/write access) is a breaking change that forces all users to re-authorize. Please remove it unless one of the new hooks explicitly requires it and explain why. |
52c7aa7 to
c34aacf
Compare
|
Updated the branch and resolved the related test issues after rebasing. Also removed the unnecessary |
|
This PR has a merge conflict with main. Please rebase your branch and resolve conflicts. Additionally, please review the OAuth scope changes in auth.ts — ensure no unnecessary scopes are being added, and that the existing |
c34aacf to
b0dafec
Compare
|
Rebased the branch with the latest |
|
Hi! This PR has been approved ( |
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR has 10 merge conflicts with current main — it needs a rebase before it can be merged. The hooks pattern (useMetrics, useStreak, etc.) and the test additions are a great idea. Please rebase and resolve the conflicts.
|
This PR has conflicts with the current |
b0dafec to
d08fd64
Compare
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
This PR now has merge conflicts with main due to recent merges. Please rebase onto the latest main branch and resolve all conflicts to proceed with merging.
Summary
Refactored dashboard widget API calls into reusable custom hooks to improve code reusability, consistency, and testability.
Closes #1053
Type of Change
Changes Made
useMetricsuseStreakuseNotificationsuseUserSettingsrefetchsupport in hooksHow to Test
npm installnpm run type-checknpm testnpm run devand verify dashboard widgets load correctlyScreenshots (if UI change)
No UI changes.
Checklist
npm run type-check)