Merge pull request #435 from ThibG/glitch-soc/features/public-modals

[Glitch] Show media modal on public pages
This commit is contained in:
beatrix
2018-04-22 12:07:29 -04:00
committed by GitHub
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);
}