intercom check

This commit is contained in:
Vladyslav Matsiiako
2023-06-22 13:29:26 -07:00
parent 8d82e2d0fc
commit 7b3bd54386
2 changed files with 4 additions and 0 deletions
@@ -50,6 +50,7 @@ export const load = () => {
} }
} }
})(); })();
console.log("loaded", APP_ID);
} }
// Initializes Intercom // Initializes Intercom
@@ -57,8 +58,10 @@ export const boot = (options = {}) => {
window && window &&
window.Intercom && window.Intercom &&
window.Intercom("boot", { app_id: APP_ID, ...options }); window.Intercom("boot", { app_id: APP_ID, ...options });
console.log("booted");
}; };
export const update = () => { export const update = () => {
window && window.Intercom && window.Intercom("update"); window && window.Intercom && window.Intercom("update");
console.log("updated");
}; };
@@ -12,6 +12,7 @@ export const IntercomProvider = ({ children }: { children: any }) => {
const router = useRouter(); const router = useRouter();
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
console.log("window is defined");
loadIntercom(); loadIntercom();
bootIntercom(); bootIntercom();
} }