Skip to content

Commit

Permalink
[MM-55165] Remove target=_blank from file preview links (mattermost#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbinnie committed Nov 9, 2023
1 parent dc269f2 commit 8bf0c19
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ exports[`components/FileInfoPreview should match snapshot, can download files 1`
<div
className="file-details__container"
>
<ExternalLink
<a
className="file-details__preview"
href="https://pre-release.mattermost.com/api/v4/files/rqir81f7a7ft8m6j6ej7g1txuo"
location="file_info_preview"
>
<span
className="file-details__preview-helper"
Expand All @@ -16,7 +15,7 @@ exports[`components/FileInfoPreview should match snapshot, can download files 1`
alt="file preview"
src={null}
/>
</ExternalLink>
</a>
<div
className="file-details"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import React from 'react';

import type {FileInfo} from '@mattermost/types/files';

import ExternalLink from 'components/external_link';

import * as Utils from 'utils/utils';

type Props = {
Expand Down Expand Up @@ -36,17 +34,16 @@ export default class FileInfoPreview extends React.PureComponent<Props> {
let preview = null;
if (this.props.canDownloadFiles) {
preview = (
<ExternalLink
<a
className='file-details__preview'
href={fileUrl}
location='file_info_preview'
>
<span className='file-details__preview-helper'/>
<img
alt={'file preview'}
src={Utils.getFileIconPath(fileInfo)}
/>
</ExternalLink>
</a>
);
} else {
preview = (
Expand Down

0 comments on commit 8bf0c19

Please sign in to comment.