Skip to content

Commit 5e330ae

Browse files
committed
cleanup
1 parent f5e0e79 commit 5e330ae

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

src/lib/hooks/app/create-app-query.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const createAppQuery = <T extends AppClient, K extends keyof T>(
8888

8989
usePolling(
9090
() => queryOptions.queryKey,
91-
() => (queryOptions.enabled ? _options?.refetchInterval : false)
91+
() => queryOptions.enabled && (_options?.refetchInterval ?? false)
9292
);
9393

9494
return fromStore(createQuery(toStore(() => queryOptions)));

src/lib/hooks/app/create-data-query.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export const createDataQuery = <T extends DataClient, K extends keyof T>(
8888

8989
usePolling(
9090
() => queryOptions.queryKey,
91-
() => (queryOptions.enabled ? _options?.refetchInterval : false)
91+
() => queryOptions.enabled && (_options?.refetchInterval ?? false)
9292
);
9393

9494
return fromStore(createQuery(toStore(() => queryOptions)));

src/lib/hooks/create-resource-query.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export const createResourceQuery = <T extends Resource, K extends keyof T>(
101101

102102
usePolling(
103103
() => queryOptions.queryKey,
104-
() => (queryOptions.enabled ? _options?.refetchInterval : false)
104+
() => queryOptions.enabled && (_options?.refetchInterval ?? false)
105105
);
106106

107107
return fromStore(createQuery(toStore(() => queryOptions)));

src/lib/hooks/use-polling.svelte.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { useQueryClient } from '@tanstack/svelte-query';
1010
*/
1111
export function usePolling(
1212
queryKey: () => unknown[],
13-
interval: () => number | false | undefined
13+
interval: () => number | false
1414
) {
1515
const queryClient = useQueryClient();
1616
let timeoutId: ReturnType<typeof setTimeout>;

src/routes/components/parts.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ let streaming = true;
2828
class="border p-2"
2929
class:bg-blue-100={partID.current === id}
3030
onclick={() => {
31-
console.log('click');
3231
partID.current = id;
3332
}}
3433
>

0 commit comments

Comments
 (0)