Forgot to save TextComponent, and cleanup some warnings

This commit is contained in:
Carlos Mesquita
2024-08-20 20:02:59 +01:00
parent 30da295c60
commit 2e699d7e25
3 changed files with 9 additions and 2 deletions

View File

@@ -99,14 +99,17 @@ const TextComponent: React.FC<Props> = ({part, contextWord, setContextWordLine})
});
if (textRef.current) {
// eslint-disable-next-line react-hooks/exhaustive-deps
resizeObserver.observe(textRef.current);
}
return () => {
if (textRef.current) {
// eslint-disable-next-line react-hooks/exhaustive-deps
resizeObserver.unobserve(textRef.current);
}
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [part.context, contextWord]);
/*if (typeof part.showContextLines === "undefined") {