import { FC, useState } from "react"; import { useRouter } from "next/router"; import Iframe from "react-iframe"; type ZammadWrapperProps = { path: string; hideSidebar?: boolean; }; export const ZammadWrapper: FC = ({ path, hideSidebar = true, }) => { const router = useRouter(); const origin = typeof window !== "undefined" && window.location.origin ? window.location.origin : ""; const [display, setDisplay] = useState("none"); const url = `${origin}/zammad${path}`; console.log({ origin, path, url }); return ( // @ts-ignore