Skip to content

Commit

Permalink
fix: warning about unknown useCallback dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
AriTheElk committed Dec 27, 2024
1 parent 7c9f0f6 commit 231fd98
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/client/ImagePickerView/ImagePickerView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,12 @@ export const ImagePickerView = () => {
[plugin]
)

const updateVisualZoom = useCallback(
throttle((zoom: number) => {
setGridHeight(zoom)
setRowHeight(zoom * ROW_HEIGHT)
}, 50),
const updateVisualZoom = useMemo(
() =>
throttle((zoom: number) => {
setGridHeight(zoom)
setRowHeight(zoom * ROW_HEIGHT)
}, 50),
[]
)

Expand Down

0 comments on commit 231fd98

Please sign in to comment.