1
0
Fork 0
mirror of https://github.com/cheeaun/phanpy.git synced 2025-03-28 00:21:36 +01:00

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} />;
}
export default memo(Notification);
export default memo(Notification, (oldProps, newProps) => {
return oldProps.notification?.id === newProps.notification?.id;
});