StatusListContainer: bust useCallback if timelineId changes

This commit is contained in:
Alex Gleason 2022-06-03 12:25:59 -05:00
parent 0a34bcfcba
commit edf366858a
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -38,11 +38,11 @@ const StatusListContainer: React.FC<IStatusListContainer> = ({
const handleScrollToTop = useCallback(debounce(() => { const handleScrollToTop = useCallback(debounce(() => {
dispatch(scrollTopTimeline(timelineId, true)); dispatch(scrollTopTimeline(timelineId, true));
}, 100), []); }, 100), [timelineId]);
const handleScroll = useCallback(debounce(() => { const handleScroll = useCallback(debounce(() => {
dispatch(scrollTopTimeline(timelineId, false)); dispatch(scrollTopTimeline(timelineId, false));
}, 100), []); }, 100), [timelineId]);
return ( return (
<> <>