Stop re-rendering the ScrollTopButton so much

This commit is contained in:
Alex Gleason
2023-10-02 12:22:09 -05:00
parent 460a6e14c3
commit 74c231b59b
2 changed files with 6 additions and 6 deletions

View File

@ -104,13 +104,13 @@ const Notifications = () => {
});
};
const handleDequeueNotifications = () => {
const handleDequeueNotifications = useCallback(() => {
dispatch(dequeueNotifications());
};
}, []);
const handleRefresh = () => {
const handleRefresh = useCallback(() => {
return dispatch(expandNotifications());
};
}, []);
useEffect(() => {
handleDequeueNotifications();