Repository navigation
fix: replace deprecated useStore and fix typecheck errors - #4059
Conversation
PR Summary by QodoFix deprecated react-form useStore usage and Firebase auth type safety
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Extension Size Change: 1.24 KB 🔺
This commit looks good, cheers 👏 |
Code Review by Qodo
1.
|
…rrors - Replace deprecated useStore with useSelector from @tanstack/react-store - Add null checks for signInWithCredential and refreshIdToken return values - Add @tanstack/react-store to catalog and extension dependencies
45a509f to
26aa80b
Compare
Extension Size Change: 1.22 KB 🔺
This commit looks good, cheers 👏 |
Changes
useStorewithuseSelectorfrom@tanstack/react-storeinAddOrEditPersonDialog.tsxsignInWithCredentialandrefreshIdTokenreturn values inuseFirebaseStore.ts@tanstack/react-storeto pnpm catalog and extension dependenciesContext
The Build CI was failing due to:
useStore is deprecated. Use useSelector instead.(@typescript-eslint/no-deprecated)IAuthResponse | undefinednot assignable toIAuthResponseandrefreshedTokenDatapossiblyundefinedBoth were pre-existing issues on the
renovate-updatesbranch.Verification
pnpm lintpassespnpm typecheck:allpassesGreptile Summary
This PR fixes a lint error on the
renovate-updatesbranch by replacing the deprecateduseStorehook (from@tanstack/react-form) withuseSelectorfrom@tanstack/react-storeinAddOrEditPersonDialog.tsx, and adds the new package as an explicit dependency in both the pnpm catalog and the extension'spackage.json.AddOrEditPersonDialog.tsx: SwapsuseStore(form.store, selector)foruseSelector(form.store, selector)— the correct migration path sinceform.storeis a@tanstack/storeStore instance thatuseSelectorsubscribes to natively.pnpm-workspace.yaml/package.json: Adds@tanstack/react-store@0.11.0to the centralised catalog and the extension's explicit dependencies, with the lock file updated accordingly.useFirebaseStore.ts, but that file does not appear in the diff — the description may be describing changes already committed to the base branch.Confidence Score: 5/5
Safe to merge — the code change is a straightforward, correct hook migration with no behavioural side effects.
The only code change is swapping a deprecated import for its documented replacement, which is correct both in terms of API shape and package boundaries. The dependency additions are minimal and properly wired through the catalog. No logic is altered and no new runtime paths are introduced.
No files require special attention beyond the open clarification about whether the
useFirebaseStore.tsnull-check fixes described in the PR exist elsewhere on the base branch.Reviews (2): Last reviewed commit: "fix: replace deprecated useStore with us..." | Re-trigger Greptile