fix: resolve lint issues in settings components

- Fix react-hooks/set-state-in-effect by inlining data fetch in useEffect
- Replace useCallback-wrapped fetch functions with plain async functions
- Replace window.location.href with window.location.assign()
- Remove unused eslint-disable directives
- Fix double res.json() call in passkey refresh
This commit is contained in:
2026-04-26 11:31:01 -05:00
parent 0d477d8402
commit 18b9e5d0db
8 changed files with 167 additions and 58 deletions
+1 -1
View File
@@ -7,5 +7,5 @@ import type { App } from "@/app/api/[[...slugs]]/route"
export const api =
typeof window === "undefined"
? // eslint-disable-next-line @typescript-eslint/no-require-imports
treaty((require("../../app/api/[[...slugs]]/route") as { app: App }).app).api
treaty((require("../app/api/[[...slugs]]/route") as { app: App }).app).api
: treaty<App>(process.env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000").api