Skip to content

Commit 08ac865

Browse files
committed
fix: Try reoing differently
1 parent 6efea92 commit 08ac865

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/integrations/reo/reo.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ export function useReo() {
77
useEffect(() => {
88
if (import.meta.env.VITE_REO_DEV_CLIENT_ID && import.meta.env.VITE_REO_DEV_CLIENT_ID !== '0') {
99
loadReoScript({ clientID: import.meta.env.VITE_REO_DEV_CLIENT_ID })
10-
.then((Reo) => reoClient = Reo?.init?.({ clientID: import.meta.env.VITE_REO_DEV_CLIENT_ID }));
10+
.then((Reo) => {
11+
Reo?.init?.({ clientID: import.meta.env.VITE_REO_DEV_CLIENT_ID });
12+
return reoClient = Reo;
13+
});
1114
}
1215
}, []);
1316
}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
declare module 'reodotdev' {
2-
export function loadReoScript({ clientID: string }): Promise<{
3-
init: null | (({ clientID: string }) => ReoClient);
4-
}>;
2+
export function loadReoScript({ clientID: string }): Promise<ReoClient>;
53

64
export interface ReoClient {
5+
init: null | (({ clientID: string }) => ReoClient);
76
identify: null | ((person: { username: string; type: string; company: string; }) => void);
87
}
98
}

0 commit comments

Comments
 (0)