@greatapps/common 1.1.412 → 1.1.413
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.
|
@@ -7,8 +7,7 @@ function useActiveSubscription() {
|
|
|
7
7
|
return useQuery({
|
|
8
8
|
queryKey: [...SUBSCRIPTIONS_QUERY_KEY, "active"],
|
|
9
9
|
queryFn: async () => {
|
|
10
|
-
|
|
11
|
-
return result?.data?.[0];
|
|
10
|
+
return await withAction(listSubscriptionsAction)({ limit: 1 });
|
|
12
11
|
}
|
|
13
12
|
});
|
|
14
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/modules/subscriptions/hooks/find-active-subscription.hook.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { listSubscriptionsAction } from \"../actions/list-subscriptions.action\";\nimport { SUBSCRIPTIONS_QUERY_KEY } from \"../constants/query-keys.constants\";\nimport { withAction } from \"../../../utils/withAction\";\n\nexport function useActiveSubscription() {\n return useQuery({\n queryKey: [...SUBSCRIPTIONS_QUERY_KEY, \"active\"],\n queryFn: async () => {\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/modules/subscriptions/hooks/find-active-subscription.hook.ts"],"sourcesContent":["\"use client\";\n\nimport { useQuery } from \"@tanstack/react-query\";\nimport { listSubscriptionsAction } from \"../actions/list-subscriptions.action\";\nimport { SUBSCRIPTIONS_QUERY_KEY } from \"../constants/query-keys.constants\";\nimport { withAction } from \"../../../utils/withAction\";\n\nexport function useActiveSubscription() {\n return useQuery({\n queryKey: [...SUBSCRIPTIONS_QUERY_KEY, \"active\"],\n queryFn: async () => {\n return await withAction(listSubscriptionsAction)({ limit: 1 });\n },\n });\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;AACzB,SAAS,+BAA+B;AACxC,SAAS,+BAA+B;AACxC,SAAS,kBAAkB;AAEpB,SAAS,wBAAwB;AACtC,SAAO,SAAS;AAAA,IACd,UAAU,CAAC,GAAG,yBAAyB,QAAQ;AAAA,IAC/C,SAAS,YAAY;AACnB,aAAO,MAAM,WAAW,uBAAuB,EAAE,EAAE,OAAO,EAAE,CAAC;AAAA,IAC/D;AAAA,EACF,CAAC;AACH;","names":[]}
|
package/package.json
CHANGED
|
@@ -9,8 +9,7 @@ export function useActiveSubscription() {
|
|
|
9
9
|
return useQuery({
|
|
10
10
|
queryKey: [...SUBSCRIPTIONS_QUERY_KEY, "active"],
|
|
11
11
|
queryFn: async () => {
|
|
12
|
-
|
|
13
|
-
return result?.data?.[0];
|
|
12
|
+
return await withAction(listSubscriptionsAction)({ limit: 1 });
|
|
14
13
|
},
|
|
15
14
|
});
|
|
16
15
|
}
|