diff --git a/app/javascript/mastodon/components/hashtag_bar.tsx b/app/javascript/mastodon/components/hashtag_bar.tsx index 91fa9221983a70..e8f3126bdec4c7 100644 --- a/app/javascript/mastodon/components/hashtag_bar.tsx +++ b/app/javascript/mastodon/components/hashtag_bar.tsx @@ -196,9 +196,15 @@ export function getHashtagBarForStatus(status: StatusLike) { }; } +export function getFeaturedHashtagBar(acct: string, tags: string[]) { + return ; +} + const HashtagBar: React.FC<{ hashtags: string[]; -}> = ({ hashtags }) => { + acct?: string; + defaultExpanded?: boolean; +}> = ({ hashtags, acct, defaultExpanded }) => { const [expanded, setExpanded] = useState(false); const handleClick = useCallback(() => { setExpanded(true); @@ -208,19 +214,23 @@ const HashtagBar: React.FC<{ return null; } - const revealedHashtags = expanded - ? hashtags - : hashtags.slice(0, VISIBLE_HASHTAGS); + const revealedHashtags = + expanded || defaultExpanded + ? hashtags + : hashtags.slice(0, VISIBLE_HASHTAGS); return (
{revealedHashtags.map((hashtag) => ( - + #{hashtag} ))} - {!expanded && hashtags.length > VISIBLE_HASHTAGS && ( + {!expanded && !defaultExpanded && hashtags.length > VISIBLE_HASHTAGS && (