Better memo for Notification

This commit is contained in:
Lim Chee Aun 2024-02-15 18:07:17 +08:00
parent 2f0d04eca4
commit b7a79c8fdd

View file

@ -357,4 +357,6 @@ function TruncatedLink(props) {
return <Link {...props} data-read-more="Read more →" ref={ref} />; return <Link {...props} data-read-more="Read more →" ref={ref} />;
} }
export default memo(Notification); export default memo(Notification, (oldProps, newProps) => {
return oldProps.notification?.id === newProps.notification?.id;
});