Skip to content

Commit ca24ae8

Browse files
committed
Pass globalThis.seamQueryClient from SeamProvider
1 parent 35ec479 commit ca24ae8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/lib/seam/SeamProvider.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ export function SeamProvider({
6969
disableFontInjection = false,
7070
unminifiyCss = false,
7171
telemetryClient,
72+
queryClient,
7273
...props
7374
}: SeamProviderProps): JSX.Element {
7475
useSeamStyles({ disabled: disableCssInjection, unminified: unminifiyCss })
@@ -89,7 +90,10 @@ export function SeamProvider({
8990
disabled={disableTelemetry}
9091
endpoint={endpoint}
9192
>
92-
<SeamQueryProvider {...props}>
93+
<SeamQueryProvider
94+
queryClient={queryClient ?? globalThis.seamQueryClient}
95+
{...props}
96+
>
9397
<Provider value={value}>
9498
<Telemetry>{children}</Telemetry>
9599
</Provider>

src/lib/seam/SeamQueryProvider.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,7 @@ export function SeamQueryProvider({
8888
const { Provider } = seamContext
8989

9090
return (
91-
<QueryClientProvider
92-
client={queryClient ?? globalThis.seamQueryClient ?? defaultQueryClient}
93-
>
91+
<QueryClientProvider client={queryClient ?? defaultQueryClient}>
9492
<Provider value={value}>
9593
<Session onSessionUpdate={onSessionUpdate}>{children}</Session>
9694
</Provider>

0 commit comments

Comments
 (0)