mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-25 06:54:43 +01:00
Fix rerender bug with followed hashtag parent
And… somehow memoize it?
This commit is contained in:
parent
9a6364a674
commit
a68dccd7cf
1 changed files with 22 additions and 19 deletions
|
@ -407,7 +407,8 @@ function Status({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check followedTags
|
// Check followedTags
|
||||||
const FollowedTagsParent = ({ children }) => (
|
const FollowedTagsParent = useCallback(
|
||||||
|
({ children }) => (
|
||||||
<div
|
<div
|
||||||
data-state-post-id={sKey}
|
data-state-post-id={sKey}
|
||||||
class="status-followed-tags"
|
class="status-followed-tags"
|
||||||
|
@ -427,6 +428,8 @@ function Status({
|
||||||
</div>
|
</div>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
|
),
|
||||||
|
[sKey, instance, snapStates.statusFollowedTags[sKey]],
|
||||||
);
|
);
|
||||||
const StatusParent =
|
const StatusParent =
|
||||||
showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length
|
showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length
|
||||||
|
|
Loading…
Add table
Reference in a new issue