Skip to content

Commit

Permalink
Improve logic to show entities saved panel description. (WordPress#67971
Browse files Browse the repository at this point in the history
)

* Improve logic to show entities saved panel description.

* Apply CR suggestion

---------

Co-authored-by: afercia <[email protected]>
Co-authored-by: Mamaduka <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
4 people authored Dec 13, 2024
1 parent 750c8e4 commit 0b1a6b6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ export function EntitiesSavedStatesExtensible( {
'description'
);

const selectItemsToSaveDescription = !! dirtyEntityRecords.length
? __( 'Select the items you want to save.' )
: undefined;

return (
<div
ref={ renderDialog ? saveDialogRef : undefined }
Expand Down Expand Up @@ -180,7 +184,7 @@ export function EntitiesSavedStatesExtensible( {
),
{ strong: <strong /> }
)
: __( 'Select the items you want to save.' ) }
: selectItemsToSaveDescription }
</p>
</div>

Expand Down

0 comments on commit 0b1a6b6

Please sign in to comment.