diff --git a/src/components/status.jsx b/src/components/status.jsx index 455cd4e..0d42e60 100644 --- a/src/components/status.jsx +++ b/src/components/status.jsx @@ -11,6 +11,7 @@ import { import { decodeBlurHash, getBlurHashAverageColor } from 'fast-blurhash'; import { shallowEqual } from 'fast-equals'; import prettify from 'html-prettify'; +import { Fragment } from 'preact'; import { memo } from 'preact/compat'; import { useCallback, @@ -406,38 +407,31 @@ function Status({ } // Check followedTags - if (showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length) { - return ( -
-
- {' '} - {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => ( - - {tag} - - ))} -
- + const FollowedTagsParent = ({ children }) => ( +
+
+ {' '} + {snapStates.statusFollowedTags[sKey].slice(0, 3).map((tag) => ( + + {tag} + + ))}
- ); - } + {children} +
+ ); + const StatusParent = + showFollowedTags && !!snapStates.statusFollowedTags[sKey]?.length + ? FollowedTagsParent + : Fragment; const isSizeLarge = size === 'l'; @@ -1383,7 +1377,7 @@ function Status({ ]); return ( - <> + {showReplyParent && !!(inReplyToId && inReplyToAccountId) && ( )} @@ -2251,7 +2245,7 @@ function Status({ )} - + ); }