mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 21:17:24 +08:00
hotfix: auto set height
This commit is contained in:
@@ -37,10 +37,12 @@ export function HTMLPreview(props: {
|
||||
const { id, height, title } = e.data;
|
||||
setTitle(title);
|
||||
if (id == frameId.current) {
|
||||
setIframeHeight(height);
|
||||
if (height != iframeHeight + 40) {
|
||||
setIframeHeight(height);
|
||||
}
|
||||
}
|
||||
});
|
||||
}, []);
|
||||
}, [iframeHeight]);
|
||||
|
||||
const height = useMemo(() => {
|
||||
const parentHeight = props.height || 600;
|
||||
|
Reference in New Issue
Block a user