From bf709f805eb00d32a4d43c8db6f28f9efae6f371 Mon Sep 17 00:00:00 2001 From: Abbey Campbell Date: Tue, 17 Feb 2026 12:38:09 -0800 Subject: [PATCH] pass elements to flashlist instead of functions --- src/components/Notifications/NotificationsList.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/Notifications/NotificationsList.tsx b/src/components/Notifications/NotificationsList.tsx index ebcc16dcc..a6347fbc8 100644 --- a/src/components/Notifications/NotificationsList.tsx +++ b/src/components/Notifications/NotificationsList.tsx @@ -8,7 +8,7 @@ import { OfflineNotice, } from "components/SharedComponents"; import { View } from "components/styledComponents"; -import React, { useCallback } from "react"; +import React, { useCallback, useMemo } from "react"; import type { RealmUser } from "realmModels/types"; import { useTranslation } from "sharedHooks"; import type { Notification } from "sharedHooks/useInfiniteNotificationsScroll"; @@ -53,14 +53,14 @@ const NotificationsList = ( { const renderItemSeparator = ( ) => ; - const renderFooter = useCallback( ( ) => ( + const footerComponent = useMemo( ( ) => ( ), [isFetching, isConnected, data.length] ); - const renderEmptyComponent = useCallback( ( ) => { + const emptyComponent = useMemo( ( ) => { // show an offline/retry state if the user isn't connected or this request just takes too long if ( isConnected === false || loadingTimedOut ) { return ; @@ -113,8 +113,8 @@ const NotificationsList = ( { return ( item.id} onEndReached={onEndReached}