Fix media icons not being added in CWs
parent
599aa0c9e3
commit
05f1a6fec3
|
@ -70,7 +70,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
collapsed: PropTypes.bool,
|
collapsed: PropTypes.bool,
|
||||||
onExpandedToggle: PropTypes.func,
|
onExpandedToggle: PropTypes.func,
|
||||||
media: PropTypes.node,
|
media: PropTypes.node,
|
||||||
mediaIcon: PropTypes.string,
|
mediaIcons: PropTypes.arrayOf(PropTypes.string),
|
||||||
parseClick: PropTypes.func,
|
parseClick: PropTypes.func,
|
||||||
disabled: PropTypes.bool,
|
disabled: PropTypes.bool,
|
||||||
onUpdate: PropTypes.func,
|
onUpdate: PropTypes.func,
|
||||||
|
@ -256,7 +256,7 @@ export default class StatusContent extends React.PureComponent {
|
||||||
const {
|
const {
|
||||||
status,
|
status,
|
||||||
media,
|
media,
|
||||||
mediaIcon,
|
mediaIcons,
|
||||||
parseClick,
|
parseClick,
|
||||||
disabled,
|
disabled,
|
||||||
tagLinks,
|
tagLinks,
|
||||||
|
@ -295,16 +295,18 @@ export default class StatusContent extends React.PureComponent {
|
||||||
key='0'
|
key='0'
|
||||||
/>,
|
/>,
|
||||||
];
|
];
|
||||||
if (mediaIcon) {
|
if (mediaIcons) {
|
||||||
|
mediaIcons.forEach((mediaIcon, idx) => {
|
||||||
toggleText.push(
|
toggleText.push(
|
||||||
<Icon
|
<Icon
|
||||||
fixedWidth
|
fixedWidth
|
||||||
className='status__content__spoiler-icon'
|
className='status__content__spoiler-icon'
|
||||||
id={mediaIcon}
|
id={mediaIcon}
|
||||||
aria-hidden='true'
|
aria-hidden='true'
|
||||||
key='1'
|
key={`icon-${idx}`}
|
||||||
/>,
|
/>,
|
||||||
);
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
toggleText = (
|
toggleText = (
|
||||||
|
|
Loading…
Reference in New Issue