Skip to content

Commit fcdaac0

Browse files
fix: react component structure in inspector for feedzy block (#1111)
1 parent a4b7788 commit fcdaac0

File tree

1 file changed

+52
-51
lines changed

1 file changed

+52
-51
lines changed

js/FeedzyBlock/inspector.js

Lines changed: 52 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -559,64 +559,65 @@ class Inspector extends Component {
559559
}
560560
render={({ open }) => (
561561
<Fragment>
562-
this.props.attributes
563-
.default !==
564-
undefined && (
565-
<Fragment>
566-
<ResponsiveWrapper
567-
naturalWidth={
568-
this
569-
.props
570-
.attributes
571-
.default
572-
.width
573-
}
574-
naturalHeight={
575-
this
576-
.props
577-
.attributes
578-
.default
579-
.height
580-
}
581-
>
582-
<img
583-
src={
562+
{this.props
563+
.attributes
564+
.default !==
565+
undefined && (
566+
<Fragment>
567+
<ResponsiveWrapper
568+
naturalWidth={
584569
this
585570
.props
586571
.attributes
587572
.default
588-
.url
573+
.width
589574
}
590-
alt={__(
591-
'Featured image',
575+
naturalHeight={
576+
this
577+
.props
578+
.attributes
579+
.default
580+
.height
581+
}
582+
>
583+
<img
584+
src={
585+
this
586+
.props
587+
.attributes
588+
.default
589+
.url
590+
}
591+
alt={__(
592+
'Featured image',
593+
'feedzy-rss-feeds'
594+
)}
595+
/>
596+
</ResponsiveWrapper>
597+
598+
<Button
599+
isLarge
600+
isSecondary
601+
onClick={() =>
602+
this.props.setAttributes(
603+
{
604+
default:
605+
undefined,
606+
}
607+
)
608+
}
609+
style={{
610+
marginTop:
611+
'10px',
612+
}}
613+
>
614+
{__(
615+
'Remove Image',
592616
'feedzy-rss-feeds'
593617
)}
594-
/>
595-
</ResponsiveWrapper>
596-
597-
<Button
598-
isLarge
599-
isSecondary
600-
onClick={() =>
601-
this.props.setAttributes(
602-
{
603-
default:
604-
undefined,
605-
}
606-
)
607-
}
608-
style={{
609-
marginTop:
610-
'10px',
611-
}}
612-
>
613-
{__(
614-
'Remove Image',
615-
'feedzy-rss-feeds'
616-
)}
617-
</Button>
618-
</Fragment>
619-
)
618+
</Button>
619+
</Fragment>
620+
)}
620621
<Button
621622
isLarge
622623
isPrimary

0 commit comments

Comments
 (0)