sa2kit 1.6.83 → 1.6.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -110,7 +110,7 @@ declare const useMasterpiecesConfig: () => {
110
110
  }[]) => Promise<void>;
111
111
  refreshData: () => Promise<{
112
112
  config: MasterpiecesConfig;
113
- collections: any;
113
+ collections: ArtCollection[];
114
114
  categories: {
115
115
  name: string;
116
116
  description?: string | null;
@@ -110,7 +110,7 @@ declare const useMasterpiecesConfig: () => {
110
110
  }[]) => Promise<void>;
111
111
  refreshData: () => Promise<{
112
112
  config: MasterpiecesConfig;
113
- collections: any;
113
+ collections: ArtCollection[];
114
114
  categories: {
115
115
  name: string;
116
116
  description?: string | null;
@@ -682,19 +682,13 @@ var init_useMasterpiecesConfig = __esm({
682
682
  setLoading(true);
683
683
  setError(null);
684
684
  console.log("\u{1F4E1} [Hook] \u5E76\u884C\u8BF7\u6C42\u6240\u6709\u6570\u636E...");
685
- const timestamp = Date.now();
686
685
  const [configData, collectionsResponse, categoriesData, tagsData] = await Promise.all([
687
686
  getConfig(),
688
- fetch(`/api/showmasterpiece/collections?_t=${timestamp}&nocache=true&includeImages=true`, {
689
- headers: {
690
- "Cache-Control": "no-cache",
691
- "Pragma": "no-cache"
692
- }
693
- }).then((r) => r.json()),
687
+ getAllCollections(),
694
688
  getCategories(),
695
689
  getTags()
696
690
  ]);
697
- const collectionsData = collectionsResponse.data || [];
691
+ const collectionsData = Array.isArray(collectionsResponse) ? collectionsResponse : [];
698
692
  console.log("\u2705 [Hook] \u6570\u636E\u52A0\u8F7D\u5B8C\u6210:", {
699
693
  \u914D\u7F6E: configData ? "\u5DF2\u52A0\u8F7D" : "\u672A\u52A0\u8F7D",
700
694
  \u753B\u96C6\u6570\u91CF: collectionsData.length,