Skip to content

Commit

Permalink
Add goBack link back for classic themes
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Jan 22, 2024
1 parent cd0d7b9 commit 73ede7f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/editor/src/components/post-template/classic-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function PostTemplateDropdownContent( { onClose } ) {
canEdit,
currentTemplateId,
getPostLinkProps,
getEditorSettings,
} = useSelect(
( select ) => {
const { canUser, getEntityRecords } = select( coreStore );
Expand Down Expand Up @@ -94,6 +95,7 @@ function PostTemplateDropdownContent( { onClose } ) {
!! _currentTemplateId,
currentTemplateId: _currentTemplateId,
getPostLinkProps: editorSettings.getPostLinkProps,
getEditorSettings: select( editorStore ).getEditorSettings,
};
},
[ allowSwitchingTemplate ]
Expand Down Expand Up @@ -180,6 +182,13 @@ function PostTemplateDropdownContent( { onClose } ) {
),
{
type: 'snackbar',
actions: [
{
label: __( 'Go back' ),
onClick: () =>
getEditorSettings().goBack(),
},
],
}
);
} }
Expand Down

0 comments on commit 73ede7f

Please sign in to comment.