@speakableio/core 0.1.59 → 0.1.60
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.
package/dist/index.native.d.mts
CHANGED
|
@@ -671,8 +671,9 @@ declare function updateCardInCache({ cardId, card, queryClient, }: {
|
|
|
671
671
|
card: CardActivityWithId | null;
|
|
672
672
|
queryClient: QueryClient;
|
|
673
673
|
}): void;
|
|
674
|
-
declare function useGetCard({ cardId }: {
|
|
674
|
+
declare function useGetCard({ cardId, enabled }: {
|
|
675
675
|
cardId: string;
|
|
676
|
+
enabled?: boolean;
|
|
676
677
|
}): _tanstack_react_query.UseQueryResult<CardActivityWithId | null, Error>;
|
|
677
678
|
|
|
678
679
|
declare const createCardRepo: () => {
|
package/dist/index.native.mjs
CHANGED
|
@@ -1814,10 +1814,11 @@ function updateCardInCache({
|
|
|
1814
1814
|
}) {
|
|
1815
1815
|
queryClient.setQueryData(cardsQueryKeys.one({ cardId }), card);
|
|
1816
1816
|
}
|
|
1817
|
-
function useGetCard({ cardId }) {
|
|
1817
|
+
function useGetCard({ cardId, enabled = true }) {
|
|
1818
1818
|
const query2 = useQuery3({
|
|
1819
1819
|
queryKey: cardsQueryKeys.one({ cardId }),
|
|
1820
|
-
queryFn: () => getCard({ cardId })
|
|
1820
|
+
queryFn: () => getCard({ cardId }),
|
|
1821
|
+
enabled: enabled && !!cardId
|
|
1821
1822
|
});
|
|
1822
1823
|
return query2;
|
|
1823
1824
|
}
|