fix(terminal): rename height -> rows

This commit is contained in:
Pihkaal
2024-01-25 20:38:42 +01:00
parent 059d1dfe42
commit 089c29b579
3 changed files with 6 additions and 4 deletions

View File

@@ -8,7 +8,10 @@ export const Terminal = (props: {
}) => {
const terminalRef = useRef<HTMLDivElement>(null);
const [size, setSize] = useState<{ cols: number; rows: number }>();
const [size, setSize] = useState<{ cols: number; rows: number }>({
cols: -1,
rows: -1,
});
useEffect(() => {
const precision = 300;
@@ -55,7 +58,7 @@ export const Terminal = (props: {
)}
style={{ backdropFilter: "blur(2px)" }}
>
{size && props.children}
{size.cols > -1 && props.children}
</div>
</TerminalContextProvider>
);

View File

@@ -21,4 +21,3 @@ export const Text = (props: {
{props.children}
</span>
);