intercom date fix

This commit is contained in:
Vladyslav Matsiiako
2023-06-22 15:57:20 -07:00
parent 48bfdd500d
commit 8efa17928c
2 changed files with 2 additions and 1 deletions

View File

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

View File

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