Skip to content

Commit

Permalink
Fix PostPreviewButton unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnajdr committed Oct 24, 2022
1 parent 13084ff commit 5e70054
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 173 deletions.
6 changes: 2 additions & 4 deletions packages/editor/src/components/post-preview-button/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ function writeInterstitialMessage( targetDocument ) {
targetDocument.close();
}

function PostPreviewButton( {
export default function PostPreviewButton( {
className,
textContent,
forceIsAutosaveable,
Expand All @@ -112,7 +112,7 @@ function PostPreviewButton( {
const core = select( coreStore );

const postType = core.getPostType(
editor.getEditedPostAttribute( 'type' )
editor.getCurrentPostType( 'type' )
);

return {
Expand Down Expand Up @@ -186,5 +186,3 @@ function PostPreviewButton( {
</Button>
);
}

export default PostPreviewButton;
Loading

0 comments on commit 5e70054

Please sign in to comment.