summaryrefslogtreecommitdiffstats
path: root/webapp/components/markdown_image.jsx
blob: 75a6ce9ea54a9781d4a71115cdb33adfe96ac65f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import React, {PureComponent} from 'react';

import {postListScrollChange} from 'actions/global_actions.jsx';

export default class MarkdownImage extends PureComponent {
    handleLoad = () => {
        postListScrollChange();
    }

    render() {
        const props = {...this.props};
        props.onLoad = this.handleLoad;

        return <img {...props}/>;
    }
}