intercom debugging

This commit is contained in:
Vladyslav Matsiiako
2023-06-22 15:09:02 -07:00
parent d4d0fe60b3
commit 62fb048cce
2 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ export const load = () => {
// Initializes Intercom
export const boot = (options = {}) => {
console.log("boot", options)
console.log("boot", options, { app_id: APP_ID, ...options })
window &&
window.Intercom &&
window.Intercom("boot", { app_id: APP_ID, ...options });

View File

@ -17,7 +17,7 @@ export const IntercomProvider = ({ children }: { children: any }) => {
if (typeof window !== "undefined") {
console.log("window is defined");
loadIntercom();
bootIntercom({name: `${user.firstName} ${user.lastName}`, email: user.email});
bootIntercom({name: `${user?.firstName || ""} ${user?.lastName || ""}`, email: user?.email || ""});
}
useEffect(() => {