diff options
author | beatrix <beatrix.bitrot@gmail.com> | 2018-04-22 12:07:29 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 12:07:29 -0400 |
commit | e88ce278550b9797d02fabf0783989a22be371f5 (patch) | |
tree | d9912392fc84393ea35274f9656237007b6a5c05 /app/javascript/flavours/glitch/components/media_gallery.js | |
parent | d7ae97c10ae8c5a0064e3a0d9262c9f182f53a6e (diff) | |
parent | 7a68079b3fc0c80238451eb1f0264ce66e495502 (diff) |
Merge pull request #435 from ThibG/glitch-soc/features/public-modals
[Glitch] Show media modal on public pages
Diffstat (limited to 'app/javascript/flavours/glitch/components/media_gallery.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/media_gallery.js | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/javascript/flavours/glitch/components/media_gallery.js b/app/javascript/flavours/glitch/components/media_gallery.js index 5169ead5a..925132b07 100644 --- a/app/javascript/flavours/glitch/components/media_gallery.js +++ b/app/javascript/flavours/glitch/components/media_gallery.js @@ -33,10 +33,6 @@ const messages = defineMessages({ class Item extends React.PureComponent { - static contextTypes = { - router: PropTypes.object, - }; - static propTypes = { attachment: ImmutablePropTypes.map.isRequired, standalone: PropTypes.bool, @@ -73,7 +69,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); } |