0
0
Fork 0

Show media modal on public pages (#6801)

This commit is contained in:
Akihiko Odaki 2018-03-24 20:52:26 +09:00 committed by Eugen Rochko
parent 1c15329cce
commit ff7941e652
8 changed files with 178 additions and 116 deletions

View file

@ -14,10 +14,6 @@ const messages = defineMessages({
class Item extends React.PureComponent {
static contextTypes = {
router: PropTypes.object,
};
static propTypes = {
attachment: ImmutablePropTypes.map.isRequired,
standalone: PropTypes.bool,
@ -53,7 +49,7 @@ class Item extends React.PureComponent {
handleClick = (e) => {
const { index, onClick } = this.props;
if (this.context.router && e.button === 0) {
if (e.button === 0) {
e.preventDefault();
onClick(index);
}