link-stack/apps/link/app/(main)/leafcutter/[view]/_components/LeafcutterWrapper.tsx

33 lines
691 B
TypeScript
Raw Normal View History

2023-06-26 10:07:12 +00:00
"use client";
2023-03-15 12:16:54 +00:00
import { FC } from "react";
2022-12-02 17:45:14 +01:00
import { Grid } from "@mui/material";
2022-12-14 13:24:50 +01:00
import Iframe from "react-iframe";
2022-12-02 17:45:14 +01:00
2023-06-26 10:07:12 +00:00
type LeafcutterWrapperProps = {
path: string;
};
export const LeafcutterWrapper: FC<LeafcutterWrapperProps> = ({ path }) => {
2023-07-21 12:26:02 +00:00
const leafcutterURL = `https://lc.digiresilience.org/${path}`;
2023-06-26 10:07:12 +00:00
return (
2022-12-02 17:45:14 +01:00
<Grid
container
spacing={0}
sx={{ height: "100%", width: "100%" }}
direction="column"
>
2022-12-14 13:24:50 +01:00
<Grid item sx={{ height: "100vh", width: "100%" }}>
<Iframe
2023-06-26 10:07:12 +00:00
id="leafcutter"
2023-07-21 12:26:02 +00:00
url={leafcutterURL}
2022-12-14 13:24:50 +01:00
width="100%"
height="100%"
frameBorder={0}
2022-12-02 17:45:14 +01:00
/>
</Grid>
</Grid>
2023-06-26 10:07:12 +00:00
);
};