Middleware and login updates

This commit is contained in:
Darren Clarke 2023-02-22 13:05:52 +00:00
parent 484e8689a4
commit 4517241ead
23 changed files with 144 additions and 112 deletions

View file

@ -2,24 +2,26 @@ import { FC, useState } from "react";
import Iframe from "react-iframe";
type ZammadWrapperProps = {
url: string;
path: string;
hideSidebar?: boolean;
};
export const ZammadWrapper: FC<ZammadWrapperProps> = ({
url,
path,
hideSidebar = true,
}) => {
const [display, setDisplay] = useState("inherit");
const [display, setDisplay] = useState("hidden");
const url = `https://redaranj-bookish-tribble-56jwjx5wh4j4w-8003.preview.app.github.dev/zammad${path}`;
console.log({ base: process.env.LINK_URL, path, url })
return (
<Iframe
< Iframe
id="link"
url={url}
width="100%"
height="100%"
frameBorder={0}
styles={{ display }}
styles={{ display }
}
onLoad={() => {
const linkElement = document.querySelector("iframe");
if (