link-stack/apps/link/app/admin/metamigo/[...path]/_components/MetamigoWrapper.tsx

37 lines
777 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";
2023-06-26 10:07:12 +00:00
import getConfig from "next/config";
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 MetamigoWrapperProps = {
path: string;
};
export const MetamigoWrapper: FC<MetamigoWrapperProps> = ({ path }) => {
const {
publicRuntimeConfig: { linkURL },
} = getConfig();
const fullMetamigoURL = `${linkURL}/metamigo/${path}`;
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
id="link"
2023-06-26 10:07:12 +00:00
url={fullMetamigoURL}
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
);
};