Skip to content

Commit

Permalink
code review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
mogmarsh committed Jan 6, 2025
1 parent 46451a6 commit c212123
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion blocks/email-settings/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default function Edit() {
newBlocks = [...parsedContentFromTemplate];
}

// @ts-ignore
// @ts-expect-error
dispatch('core/block-editor').resetBlocks(newBlocks);
};

Expand Down
8 changes: 3 additions & 5 deletions blocks/section/edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ export default function Edit({
const handleSelect = (posts: number[]) => {
postBlocks.forEach((id: string) => {
const postId = posts.shift();
// @ts-ignore
// @ts-expect-error
dispatch('core/block-editor').updateBlockAttributes(id, { postId });
});
};

useEffect(() => {
if (showNumbers) {
postBlocks.forEach((id: string, index: number) => {
// @ts-ignore
// @ts-expect-error
dispatch('core/block-editor').updateBlockAttributes(id, { number: index + 1 });
});
}
Expand All @@ -124,18 +124,16 @@ export default function Edit({
<InnerBlocks />
</div>
<InspectorControls>
{ /* @ts-ignore */}
<PanelBody
title={__('Post Selection', 'wp-newsletter-builder')}
initialOpen
>
{ /* @ts-ignore */}
<PanelRow>
<MultiplePostPicker
onUpdate={handleSelect}
allowedTypes={allowedPostTypes}
params={{ after: cutoff.toISOString(), per_page: 20 }}
// @ts-ignore
// @ts-expect-error
searchRender={PostPickerResult}
/>
</PanelRow>
Expand Down

0 comments on commit c212123

Please sign in to comment.