hunk.code_window:     className="file-details__preview"
       href="https://pre-release.mattermost.com/api/v4/files/rqir81f7a7ft8m6j6ej7g1txuo"
       location="file_info_preview"
     >
       <span
         className="file-details__preview-helper"
       />
       <img
  
hunk.labels: keep keep replace keep keep keep keep keep
hunk.file_path: webapp/channels/src/components/file_info_preview/__snapshots__/file_info_preview.test.tsx.snap
hunk.type: replace
file: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  import {connect} from 'react-redux';
  import type {ConnectedProps} from 'react-redux';
  
  import {getChannel, getCurrentChannel} from 'mattermost-redux/selectors/entities/channels';
  import {getPost} from 'mattermost-redux/selectors/entities/posts';
  
  import {getSelectedPostId} from 'selectors/rhs';
  
  import type {GlobalState} from 'types/store';
  
  import PostEditHistory from './post_edit_history';
  
  function mapStateToProps(state: GlobalState) {
      const selectedPostId = getSelectedPostId(state) || '';
      const originalPost = getPost(state, selectedPostId);
      const channelDisplayName = getCurrentChannel(state) ? getCurrentChannel(state).display_name : getChannel(state, originalPost.channel_id).display_name;
  
      return {
          channelDisplayName,
          originalPost,
      };
  }
  
  const connector = connect(mapStateToProps);
  
  export type PropsFromRedux = ConnectedProps<typeof connector>;
  
  export default connector(PostEditHistory);
  