diff --git a/packages/edit-site/src/components/save-panel/index.js b/packages/edit-site/src/components/save-panel/index.js index 418de53390cacb..5c1bcc1df281e0 100644 --- a/packages/edit-site/src/components/save-panel/index.js +++ b/packages/edit-site/src/components/save-panel/index.js @@ -39,13 +39,19 @@ const EntitiesSavedStatesForPreview = ( { onClose } ) => { activateSaveLabel = __( 'Activate' ); } - const { getTheme } = useSelect( coreStore ); - const theme = getTheme( currentlyPreviewingTheme() ); + const themeName = useSelect( ( select ) => { + const theme = select( coreStore ).getTheme( + currentlyPreviewingTheme() + ); + + return theme?.name?.rendered; + }, [] ); + const additionalPrompt = (
{ sprintf( - 'Saving your changes will change your active theme to %1$s.', - theme?.name?.rendered + 'Saving your changes will change your active theme to %s.', + themeName ) }
);