Enable media editor for everyone

This commit is contained in:
Evan Hahn 2021-12-14 18:53:15 -06:00 committed by GitHub
parent 71e9498961
commit 97d42d5e7b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 29 deletions

View file

@ -58,7 +58,6 @@ import {
import { MediaEditor } from './MediaEditor';
import { IMAGE_PNG } from '../types/MIME';
import { isImageTypeSupported } from '../util/GoogleChrome';
import { canEditImages } from '../util/canEditImages';
export type CompositionAPIType =
| {
@ -293,13 +292,8 @@ export const CompositionArea = ({
}
}, []);
const hasImageEditingEnabled = canEditImages();
function maybeEditAttachment(attachment: AttachmentDraftType) {
if (
!hasImageEditingEnabled ||
!isImageTypeSupported(attachment.contentType)
) {
if (!isImageTypeSupported(attachment.contentType)) {
return;
}
@ -647,7 +641,6 @@ export const CompositionArea = ({
<div className="CompositionArea__attachment-list">
<AttachmentList
attachments={draftAttachments}
canEditImages={hasImageEditingEnabled}
i18n={i18n}
onAddAttachment={launchAttachmentPicker}
onClickAttachment={maybeEditAttachment}