mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 09:06:23 +01:00
Better memo for Notification
This commit is contained in:
parent
2f0d04eca4
commit
b7a79c8fdd
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue