refactor: fix spelling and wording errors

This commit is contained in:
kasia.oczkowska
2024-06-12 13:57:26 +01:00
parent 96fba7fbb8
commit 4d79220b0c
6 changed files with 24 additions and 30 deletions

View File

@@ -0,0 +1,13 @@
import { useEffect } from 'react';
import { useViewport, useReactFlow } from 'reactflow';
export const useScrollBoundaries = () => {
const { setViewport } = useReactFlow();
const { x, y, zoom } = useViewport();
useEffect(() => {
if (y > 0) {
setViewport({ x, y: 0, zoom });
}
}, [y]);
};