fix(terminal): prevent terminal from collapsing on zoom

This commit is contained in:
Yash Kumar
2026-10-04 21:37:15 +05:30
parent 48504fde4e
commit 5c19d1b704
@@ -45,9 +45,8 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
term.loadAddon(clipboardAddon);
fixMacOsAltKeys(term);
// @ts-ignore
// @ts-expect-error
term.open(termRef.current);
// @ts-ignore
term.loadAddon(addonFit);
addonFit.fit();
@@ -89,9 +88,9 @@ export const Terminal: React.FC<Props> = ({ id, serverId }) => {
}, [id, serverId]);
return (
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-4 h-full w-full">
<div className="w-full h-full bg-transparent border rounded-lg p-2">
<div id={id} ref={termRef} className="rounded-xl" />
<div id={id} ref={termRef} className="rounded-xl h-full w-full" />
</div>
</div>
);