0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-14 06:22:40 +00:00
[UserPage] Add key prop to Brew tags
This commit is contained in:
Trevor Buckner
2022-10-24 23:20:02 -04:00
committed by GitHub

View File

@@ -117,7 +117,7 @@ const BrewItem = createClass({
<i className='fas fa-tags'/> <i className='fas fa-tags'/>
{brew.tags.map((tag, idx)=>{ {brew.tags.map((tag, idx)=>{
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/); const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
return <span className={matches[1]}>{matches[2]}</span>; return <span key={idx} className={matches[1]}>{matches[2]}</span>;
})} })}
</div> </div>
</> : <></> </> : <></>