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

View File

@@ -50,6 +50,7 @@ export const load = () => {
}
}
})();
console.log("loaded", APP_ID);
}
// Initializes Intercom
@@ -57,8 +58,10 @@ export const boot = (options = {}) => {
window &&
window.Intercom &&
window.Intercom("boot", { app_id: APP_ID, ...options });
console.log("booted");
};
export const update = () => {
window && window.Intercom && window.Intercom("update");
console.log("updated");
};

View File

@@ -12,6 +12,7 @@ export const IntercomProvider = ({ children }: { children: any }) => {
const router = useRouter();
if (typeof window !== "undefined") {
console.log("window is defined");
loadIntercom();
bootIntercom();
}