[Glitch] Show media modal on public pages

Port ff7941e652 to glitch-soc
This commit is contained in:
Thibaut Girka
2018-04-20 15:58:36 +02:00
parent d55ab8e3e8
commit 7a68079b3f
8 changed files with 178 additions and 118 deletions

View File

@@ -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);
}