Using DPC as a client-side library
typeof window !== "undefined"
. Since we are importing DPC as a module we can’t do it the with the normal import { DPC } from "depict-ai/dpc"
syntax. Instead, we can use dynamic imports. This is also documented by Next.js.