Skip to content

Commit

Permalink
Remove old isLarge attribute causing console errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmpurdy committed Aug 21, 2022
1 parent 80f6793 commit 70747ed
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions src/block/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ class CloudflareStreamEdit extends Component {
const { setAttributes } = this.props;
setAttributes( { uid: attachment.uid, thumbnail: attachment.thumb.src } );
this.setState( { editing: false, uploading: false, encoding: false } );
cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Added to blog post' );
this.reload();
}

Expand All @@ -122,7 +121,6 @@ class CloudflareStreamEdit extends Component {
},
error: function( jqXHR, textStatus ) {
console.error( 'Error: ' + textStatus );
cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Error' );
},
} );
}
Expand All @@ -142,7 +140,6 @@ class CloudflareStreamEdit extends Component {
},
error: function( jqXHR, textStatus ) {
console.error( 'Error: ' + textStatus );
cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Error' );
},
} );
}
Expand All @@ -168,7 +165,6 @@ class CloudflareStreamEdit extends Component {

const baseUrl = 'https://api.cloudflare.com/client/v4/accounts/' + cloudflareStream.api.account + '/media';

cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Started uploading a video' );
const upload = new tus.Upload( file, {
resume: block.state.resume,
removeFingerprintOnSuccess: true,
Expand All @@ -187,7 +183,6 @@ class CloudflareStreamEdit extends Component {
progressBar.hide();
jQuery( '.editor-media-placeholder .components-placeholder__instructions' ).html( 'Upload Error: See the console for details.' );
jQuery( '.editor-media-placeholder__retry-button' ).show();
cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Error' );
},
onProgress: function( bytesUploaded, bytesTotal ) {
const percentage = parseInt( bytesUploaded / bytesTotal * 100 );
Expand All @@ -200,7 +195,6 @@ class CloudflareStreamEdit extends Component {
const mediaId = urlArray[ urlArray.length - 1 ];

setAttributes( { uid: mediaId, fingerprint: upload.options.fingerprint( upload.file, upload.options ) } );
cloudflareStream.analytics.logEvent( 'Stream WP Plugin - Finished uploading a video' );
block.switchToEncoding();
},
} );
Expand Down Expand Up @@ -349,7 +343,6 @@ class CloudflareStreamEdit extends Component {
</div>
<Button
isSecondary
isLarge
icon="update"
label={ __( 'Retry' ) }
onClick={ switchToEditing }
Expand All @@ -376,7 +369,6 @@ class CloudflareStreamEdit extends Component {
</div>
<Button
isSecondary
isLarge
icon="update"
label={ __( 'Retry' ) }
onClick={ switchToEditing }
Expand All @@ -402,7 +394,6 @@ class CloudflareStreamEdit extends Component {
value={ this.props.attributes }
render={ () => (
<Button
isLarge
label={ __( 'Stream Library' ) }
onClick={ this.open }
className="editor-media-placeholder__browse-button"
Expand All @@ -413,7 +404,6 @@ class CloudflareStreamEdit extends Component {
/>
<Button
isSecondary
isLarge
icon="cancel"
label={ __( 'Cancel' ) }
onClick={ switchFromEditing }
Expand All @@ -433,7 +423,6 @@ class CloudflareStreamEdit extends Component {
instructions="Select a file from your library."
>
<FormFileUpload
isLarge
multiple
className="editor-media-placeholder__upload-button"
onChange={ switchToUploading }
Expand All @@ -447,7 +436,6 @@ class CloudflareStreamEdit extends Component {
value={ this.props.attributes }
render={ () => (
<Button
isLarge
label={ __( 'Stream Library' ) }
onClick={ this.open }
className="editor-media-placeholder__browse-button"
Expand All @@ -458,7 +446,6 @@ class CloudflareStreamEdit extends Component {
/>
<Button
isSecondary
isLarge
icon="cancel"
label={ __( 'Cancel' ) }
onClick={ switchFromEditing }
Expand Down

0 comments on commit 70747ed

Please sign in to comment.