mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-11-19 07:18:14 +00:00
Make updateUrl() only update Url
This commit is contained in:
@@ -37,8 +37,6 @@ const BrewItem = ({
|
||||
});
|
||||
}, [brew, reportError]);
|
||||
|
||||
const updateFilter = useCallback((type, term)=>updateListFilter(type, term), [updateListFilter]);
|
||||
|
||||
const renderDeleteBrewLink = ()=>{
|
||||
if(!brew.editId) return null;
|
||||
|
||||
@@ -132,7 +130,7 @@ const BrewItem = ({
|
||||
<i className='fas fa-tags' />
|
||||
{brew.tags.map((tag, idx)=>{
|
||||
const matches = tag.match(/^(?:([^:]+):)?([^:]+)$/);
|
||||
return <span key={idx} className={matches[1]} onClick={()=>updateFilter(tag)}>{matches[2]}</span>;
|
||||
return <span key={idx} className={matches[1]} onClick={()=>updateListFilter(tag)}>{matches[2]}</span>;
|
||||
})}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
Reference in New Issue
Block a user