Skip to content

Commit 01682bf

Browse files
committed
chore: resolve useCallback implicit any issues
1 parent be9694c commit 01682bf

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

packages/react-components/react-toast/library/src/components/ToastContainer/useToastContainer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ export const useToastContainer_unstable = (
132132

133133
// Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController
134134
const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;
135-
const onMotionFinish: ToastContainerState['onMotionFinish'] = React.useCallback(
136-
(_, { direction }) => {
135+
const onMotionFinish = React.useCallback(
136+
(_: null, { direction }: { direction: 'enter' | 'exit' }) => {
137137
if (direction === 'exit') {
138138
remove();
139139
}

packages/react-components/react-virtualizer/library/src/hooks/useDynamicPagination.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,10 @@ export const useDynamicVirtualizerPagination = (
104104
/**
105105
* On scroll timer that will continuously delay callback until scrolling stops
106106
*/
107-
const onScroll = React.useCallback(
108-
event => {
109-
clearScrollTimer();
110-
setScrollTimer(onScrollEnd, 100);
111-
},
112-
[onScrollEnd, clearScrollTimer, setScrollTimer],
113-
);
107+
const onScroll = React.useCallback(() => {
108+
clearScrollTimer();
109+
setScrollTimer(onScrollEnd, 100);
110+
}, [onScrollEnd, clearScrollTimer, setScrollTimer]);
114111

115112
/**
116113
* Pagination ref will ensure we attach listeners to containers on change

0 commit comments

Comments
 (0)