Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
module.exports = {
ignoreFiles: [
'**/dist/**',
'**/node_modules/**',
'**/release/**',
'**/scripts/**',
],
extends: [ './node_modules/newspack-scripts/config/stylelint.config.js' ],
};
};
4 changes: 2 additions & 2 deletions cssnano.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
preset: [
'default',
// The CSS comment is needed for the theme headers.
{ discardComments: false }
]
{ discardComments: false },
],
};
4 changes: 1 addition & 3 deletions includes/blocks/subtitle-block/post-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ const appendSubtitleToTitleDOMElement = ( subtitle, callback ) => {
* registered in the post editor – this block will only be registered in the site editor.
*/
const NewspackSubtitlePanel = () => {
const subtitle = useSelect(
select => select( 'core/editor' ).getEditedPostAttribute( 'meta' )[ META_FIELD_NAME ]
);
const subtitle = useSelect( select => select( 'core/editor' ).getEditedPostAttribute( 'meta' )[ META_FIELD_NAME ] );
const dispatch = useDispatch();
const saveSubtitle = updatedSubtitle => {
dispatch( 'core/editor' ).editPost( {
Expand Down
5 changes: 1 addition & 4 deletions includes/blocks/subtitle-block/site-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@ import metadata from './block.json';

const EditComponent = ( { context: { postType, postId } } ) => {
const [ postMeta = {} ] = useEntityProp( 'postType', postType, 'meta', postId );
return (
postMeta[ newspack_block_theme_subtitle_block.post_meta_name ] ||
__( 'Article subtitle', 'newspack-block-theme' )
);
return postMeta[ newspack_block_theme_subtitle_block.post_meta_name ] || __( 'Article subtitle', 'newspack-block-theme' );
};

const blockData = {
Expand Down
Loading