Skip to content

Commit 56fc03b

Browse files
committed
Try to make sense of some thinggs
1 parent a14d8cf commit 56fc03b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/blueapi/blueapi.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,12 @@ export function useBlueApiCall(
4444
pollRateMillis?: number,
4545
queryKey?: string
4646
) {
47-
return useQuery(
48-
queryKey ?? "BlueApiCall",
49-
async () => await blueApiCall(endpoint, method, body),
50-
{
51-
refetchInterval: pollRateMillis ?? 500,
52-
}
53-
);
47+
const fetchCall = async () => {
48+
return await blueApiCall(endpoint, method, body);
49+
};
50+
return useQuery(queryKey ?? "BlueApiCall", fetchCall, {
51+
refetchInterval: pollRateMillis ?? 500,
52+
});
5453
}
5554

5655
export function processUseBlueApiCall(

0 commit comments

Comments
 (0)