Skip to content

Commit

Permalink
update the use of Iframe
Browse files Browse the repository at this point in the history
  • Loading branch information
KrinsKumar committed Nov 18, 2024
1 parent 6b383ff commit 76dfdbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/HtmlPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { lazy, memo, useMemo, type ReactNode } from "react";
import { Card, CardBody, IconButton } from "@chakra-ui/react";
import { TbExternalLink } from "react-icons/tb";

const IframeResizer = lazy(() => import("iframe-resizer-react"));
const IframeResizer = lazy(() => import("@iframe-resizer/react"));

type HtmlPreviewProps = {
children: ReactNode & ReactNode[];
Expand Down Expand Up @@ -45,10 +45,10 @@ const HtmlPreview = ({ children, isLoading = false }: HtmlPreviewProps) => {
/>
<CardBody mt={10} p={2}>
<IframeResizer
license="GPLv3"
checkOrigin={false}
src={url}
style={{ width: "1px", minWidth: "100%" }}
heightCalculationMethod={"max"}
/>
</CardBody>
</Card>
Expand Down

0 comments on commit 76dfdbd

Please sign in to comment.