about summary refs log tree commit diff
path: root/app/javascript/flavours/glitch/components/media_gallery.js
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2018-04-20 15:58:36 +0200
committerThibaut Girka <thib@sitedethib.com>2018-04-20 15:58:36 +0200
commit7a68079b3fc0c80238451eb1f0264ce66e495502 (patch)
tree1b152f9c86f9825dfcfadaaa1e8e4a817d5e0545 /app/javascript/flavours/glitch/components/media_gallery.js
parentd55ab8e3e83d4a19005784f9cdbc1fa920cd2f96 (diff)
[Glitch] Show media modal on public pages
Port ff7941e652af1d54d9c991254556e7932a8b183c to glitch-soc
Diffstat (limited to 'app/javascript/flavours/glitch/components/media_gallery.js')
-rw-r--r--app/javascript/flavours/glitch/components/media_gallery.js6
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 309308d25..603aebc86 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);
     }