ui: new api call design

- api functions exist under api.*
- they accept an abort signal and return a promise
- they can be swapped out at build time depending on the platform
  (e.g.,window.method on desktop, fetch on mobile)
- TanStack Query functions should only be used in components, and
  only when we need its features, favoring simpler api.* calls
This commit is contained in:
Glen Huang
2025-09-29 21:33:16 +08:00
parent adb82a8414
commit a268be69fe
10 changed files with 263 additions and 105 deletions

View File

@@ -15,7 +15,8 @@
"allowJs": true,
"isolatedModules": true,
"paths": {
"@/*": ["./*"]
"@/*": ["./*"],
"@api/clan/client": ["./src/api/clan/client-call"]
}
}
}