fix: don't load crisp until window is defined i guess?

This commit is contained in:
Naomi Carrigan 2024-11-28 14:55:08 -08:00
parent 9e9df55ad2
commit d7927fcf0d
Signed by: naomi
SSH Key Fingerprint: SHA256:rca1iUI2OhAM6n4FIUaFcZcicmri0jgocqKiTTAfrt8

View File

@ -17,7 +17,9 @@ import React, { type JSX } from "react";
* @returns A JSX element. * @returns A JSX element.
*/ */
export const Footer = (): JSX.Element | null => { export const Footer = (): JSX.Element | null => {
Crisp.configure("5398ce41-4ceb-4e31-9049-4c784a70179a"); if (typeof window !== "undefined") {
Crisp.configure("5398ce41-4ceb-4e31-9049-4c784a70179a");
}
const pathname = usePathname(); const pathname = usePathname();
const isRootPath = pathname === "/"; const isRootPath = pathname === "/";