// Package imports //
import React from 'react';
import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { FormattedMessage } from 'react-intl';
import Icon from 'flavours/glitch/components/icon';
import { me } from 'flavours/glitch/util/initial_state';
export default class StatusPrepend extends React.PureComponent {
static propTypes = {
type: PropTypes.string.isRequired,
account: ImmutablePropTypes.map.isRequired,
parseClick: PropTypes.func.isRequired,
notificationId: PropTypes.number,
};
handleClick = (e) => {
const { account, parseClick } = this.props;
parseClick(e, `/accounts/${account.get('id')}`);
}
Message = () => {
const { type, account } = this.props;
let link = (
);
switch (type) {
case 'featured':
return (
);
case 'reblogged_by':
return (
);
case 'favourite':
return (
);
case 'reblog':
return (
);
case 'poll':
if (me === account.get('id')) {
return (
);
} else {
return (
);
}
}
return null;
}
render () {
const { Message } = this;
const { type } = this.props;
return !type ? null : (
);
}
}