Updates for Zammad 6

This commit is contained in:
Darren Clarke 2023-07-11 10:05:52 +00:00 committed by GitHub
parent 60b82f6fb4
commit 73fdb6e5d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 101 additions and 23 deletions

View file

@ -15,12 +15,8 @@ export const ZammadWrapper: FC<ZammadWrapperProps> = ({
hideSidebar = true,
}) => {
const router = useRouter();
const [display, setDisplay] = useState("inherit");
//const {
// publicRuntimeConfig: { linkURL },
// } = getConfig();
const linkURL = "http://localhost:3000";
const url = `${linkURL}/proxy/zammad${path}`;
const [display, setDisplay] = useState("none");
const url = `/proxy/zammad${path}`;
console.log({ url });
return (
@ -34,8 +30,6 @@ export const ZammadWrapper: FC<ZammadWrapperProps> = ({
styles={{ display }}
onLoad={() => {
const linkElement = document.querySelector("iframe");
// const baseElement = linkElement.contentDocument.createElement("base");
// baseElement.href = `${linkURL}/proxy/zammad`;
if (
linkElement.contentDocument &&
linkElement.contentDocument?.querySelector &&