refactor: reduce duplicated separately useSWR (#6153)

* refactor: reduce duplicated seperatlly useSWR

* refactor: streamline useSWR integration and improve error handling
This commit is contained in:
Tunglies
2026-01-25 07:14:45 +00:00
committed by GitHub
parent bf189bb144
commit c7462716e5
5 changed files with 25 additions and 34 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export const useAppData = () => {
const context = use(AppDataContext);
if (!context) {
throw new Error("useAppData必须在AppDataProvider内使用");
throw new Error("useAppData must be used within AppDataProvider");
}
return context;