0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-04 19:02:38 +00:00

Use the whole tag in the tag filter

This commit is contained in:
G.Ambatte
2023-12-03 16:02:36 +13:00
parent 041c7ed48f
commit 632882d370

View File

@@ -135,7 +135,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 key={idx} className={matches[1]} onClick={()=>{this.updateFilter('tag', matches[2]);}}>{matches[2]}</span>; return <span key={idx} className={matches[1]} onClick={()=>{this.updateFilter('tag', tag);}}>{matches[2]}</span>;
})} })}
</div> </div>
</> : <></> </> : <></>