Fix UseFitOnce

This commit is contained in:
Eric NGUYEN 2022-08-31 17:47:37 +02:00
parent f6953e42df
commit cae628537c

View file

@ -124,8 +124,10 @@ export function SVG(props: ISVGProps): JSX.Element {
</div>
);
}
function UseFitOnce(svgViewer: React.RefObject<ReactSVGPanZoom>) {
function UseFitOnce(svgViewer: React.RefObject<ReactSVGPanZoom>): void {
React.useEffect(() => {
svgViewer?.current?.fitToViewer();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}