casting to date

This commit is contained in:
Vladyslav Matsiiako
2023-06-22 16:25:21 -07:00
parent e0976d6bd6
commit 12d0916625

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: Math.floor((user?.createdAt?.getTime() || 0) / 1000)});
bootIntercom({name: `${user?.firstName || ""} ${user?.lastName || ""}`, email: user?.email || "", created_at: Math.floor(((new Date(user?.createdAt))?.getTime() || 0) / 1000)});
}
useEffect(() => {