Fix rerender bug with followed hashtag parent

And… somehow memoize it?
pull/501/head
Lim Chee Aun 2024-04-15 21:37:03 +08:00
rodzic 9a6364a674
commit a68dccd7cf
1 zmienionych plików z 22 dodań i 19 usunięć

Wyświetl plik

@ -407,7 +407,8 @@ function Status({
}
// Check followedTags
const FollowedTagsParent = ({ children }) => (
const FollowedTagsParent = useCallback(
({ children }) => (
<div
data-state-post-id={sKey}
class="status-followed-tags"
@ -427,6 +428,8 @@ function Status({
</div>
{children}
</div>
),
[sKey, instance, snapStates.statusFollowedTags[sKey]],
);
const StatusParent =
showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length