Skip to content

Commit

Permalink
Issue #27 - avoid messages along the lines of Warning: Each child in …
Browse files Browse the repository at this point in the history
…a list should have a unique key prop.
  • Loading branch information
bobbingwide committed Jan 13, 2020
1 parent 3a273c5 commit aea0217
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions blocks/oik-blocklist/blocklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function BlockCreateItem( block, component ) {
if ( component == '') {
component = "?enter component?";
}
return( <Fragment>
return( <Fragment key={block.name}>
<br/>oikwp oik-create-blocks.php {block.name} "{block.title}" {component} url={url}
<br/>oikwp oik-update-blocks.php {block.name} "{keywords}" {block.category} url={url}
</Fragment> );
Expand All @@ -154,7 +154,7 @@ function BlockCreateBlockLink( block, component ) {
var blockIcon = renderToString( <BlockIcon icon={block.icon.src } /> );
url = addQueryArgs( url, { icon: blockIcon });
//console.log( url );
return( <a href={ url }>
return( <a key={block.name} href={ url }>
Create/Update: {block.title} - {block.name}<br />
</a>
);
Expand Down
11 changes: 7 additions & 4 deletions blocks/oik-blocklist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export default registerBlockType(



return [
return (

<Fragment>
<InspectorControls >
<PanelBody>

Expand Down Expand Up @@ -205,14 +207,15 @@ export default registerBlockType(
</PanelBody>

</InspectorControls>
,

<div className={ props.className }>
{ blocklist }
</div>
,
</Fragment>



];
);
},
/*
<ServerSideRender
Expand Down

0 comments on commit aea0217

Please sign in to comment.