Middleware and login updates
This commit is contained in:
parent
484e8689a4
commit
4517241ead
23 changed files with 144 additions and 112 deletions
|
|
@ -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 (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue