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:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user