{
diff --git a/packages/editor/src/components/post-card-panel/index.js b/packages/editor/src/components/post-card-panel/index.js
index 8fcca6c6bd6d40..e347d3c79fc521 100644
--- a/packages/editor/src/components/post-card-panel/index.js
+++ b/packages/editor/src/components/post-card-panel/index.js
@@ -64,7 +64,7 @@ export default function PostCardPanel( {
[ postId, postType ]
);
- const pageTypeBadge = usePageTypeBadge();
+ const pageTypeBadge = usePageTypeBadge( postId );
return (
@@ -78,9 +78,7 @@ export default function PostCardPanel( {
numberOfLines={ 2 }
truncate
className="editor-post-card-panel__title"
- weight={ 500 }
as="h2"
- lineHeight="20px"
>
{ title ? decodeEntities( title ) : __( 'No title' ) }
{ pageTypeBadge && (
diff --git a/packages/editor/src/components/post-card-panel/style.scss b/packages/editor/src/components/post-card-panel/style.scss
index d8a2a4628e6f9c..d9ecfc58304e85 100644
--- a/packages/editor/src/components/post-card-panel/style.scss
+++ b/packages/editor/src/components/post-card-panel/style.scss
@@ -7,6 +7,7 @@
width: 100%;
&.editor-post-card-panel__title {
+ @include heading-medium();
margin: 0;
padding: 2px 0;
display: flex;
diff --git a/packages/editor/src/utils/pageTypeBadge.js b/packages/editor/src/utils/pageTypeBadge.js
index 321b9caa17769e..bc787b12284222 100644
--- a/packages/editor/src/utils/pageTypeBadge.js
+++ b/packages/editor/src/utils/pageTypeBadge.js
@@ -5,19 +5,14 @@ import { __ } from '@wordpress/i18n';
import { useSelect } from '@wordpress/data';
import { store as coreStore } from '@wordpress/core-data';
-/**
- * Internal dependencies
- */
-import { store as editorStore } from '../store';
-
/**
* Custom hook to get the page type badge for the current post on edit site view.
+ *
+ * @param {number} postId postId of the current post being edited.
*/
-export default function usePageTypeBadge() {
+export default function usePageTypeBadge( postId ) {
const { isFrontPage, isPostsPage } = useSelect( ( select ) => {
- const { getCurrentPostId } = select( editorStore );
const { canUser, getEditedEntityRecord } = select( coreStore );
- const postId = getCurrentPostId();
const siteSettings = canUser( 'read', {
kind: 'root',
name: 'site',