Show media modal on public pages (#6801)
This commit is contained in:
parent
1c15329cce
commit
ff7941e652
8 changed files with 178 additions and 116 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue