Claire b7afca0f05
Change status content markup to match upstream (#2923)
* Remove option to have media outside of CWs

Upstream adopted the media-in-CW design glitch-soc originally had.

* Move poll to StatusContent

* Refactor status media icons

* Rename `forceFilter` to `showDespiteFilter` for consistency with upstream

* Change media and status content markup to match upstream's

* Add mention placeholders back
2024-12-29 19:59:19 +01:00

29 lines
775 B
JavaScript

import ImmutablePropTypes from 'react-immutable-proptypes';
import { Permalink } from 'flavours/glitch/components/permalink';
export const MentionsPlaceholder = ({ status }) => {
if (status.get('spoiler_text').length === 0 || !status.get('mentions')) {
return null;
}
return (
<div className='status__content'>
{status.get('mentions').map(item => (
<Permalink
to={`/@${item.get('acct')}`}
href={item.get('url')}
key={item.get('id')}
className='mention'
>
@<span>{item.get('username')}</span>
</Permalink>
)).reduce((aggregate, item) => [...aggregate, item, ' '], [])}
</div>
);
};
MentionsPlaceholder.propTypes = {
status: ImmutablePropTypes.map.isRequired,
};