Skip to content

Commit

Permalink
Add instructions to reload the page on fatal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ryelle committed Mar 2, 2021
1 parent 4e1a6e4 commit 1ba0be7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,7 @@ function DownloadableBlockListItem( { composite, item, onClick } ) {
) }
</span>
{ hasNotice ? (
<DownloadableBlockNotice
onClick={ onClick }
block={ item }
/>
<DownloadableBlockNotice block={ item } />
) : (
<>
<span className="block-directory-downloadable-block-list-item__desc">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* WordPress dependencies
*/
import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';

/**
Expand All @@ -23,6 +24,9 @@ export const DownloadableBlockNotice = ( { block } ) => {
<div className="block-directory-downloadable-block-notice">
<div className="block-directory-downloadable-block-notice__content">
{ errorNotice.message }
{ errorNotice.isFatal
? ' ' + __( 'Try reloading the page.' )
: null }
</div>
</div>
);
Expand Down

0 comments on commit 1ba0be7

Please sign in to comment.