frontend 성능 개선
This commit is contained in:
@@ -638,7 +638,7 @@ export const TradeNotificationProvider: React.FC<ProviderProps> = ({
|
||||
setDetailCentered(false);
|
||||
}, []);
|
||||
|
||||
const value: TradeNotificationContextValue = {
|
||||
const value = useMemo<TradeNotificationContextValue>(() => ({
|
||||
toastNotifications,
|
||||
allNotifications,
|
||||
unreadCount,
|
||||
@@ -657,7 +657,26 @@ export const TradeNotificationProvider: React.FC<ProviderProps> = ({
|
||||
detailCentered,
|
||||
openDetail,
|
||||
closeDetail,
|
||||
};
|
||||
}), [
|
||||
toastNotifications,
|
||||
allNotifications,
|
||||
unreadCount,
|
||||
addNotification,
|
||||
dismissToast,
|
||||
dismissToasts,
|
||||
dismissAllToasts,
|
||||
markAsRead,
|
||||
markAllAsRead,
|
||||
deleteNotification,
|
||||
deleteNotifications,
|
||||
deleteUnreadNotifications,
|
||||
deleteAllNotifications,
|
||||
refreshHistory,
|
||||
detailSignal,
|
||||
detailCentered,
|
||||
openDetail,
|
||||
closeDetail,
|
||||
]);
|
||||
|
||||
return (
|
||||
<TradeNotificationContext.Provider value={value}>
|
||||
|
||||
Reference in New Issue
Block a user