sforkowany z mirror/soapbox
StatusListContainer: bust useCallback if timelineId changes
rodzic
0a34bcfcba
commit
edf366858a
|
@ -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 (
|
||||||
<>
|
<>
|
||||||
|
|
Ładowanie…
Reference in New Issue