0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 18:32:41 +00:00

Move from let to const

This commit is contained in:
G.Ambatte
2023-04-10 10:16:28 +12:00
parent 9690c6dac3
commit 0aac08f276

View File

@@ -32,8 +32,7 @@ const MetadataNav = createClass({
if(!this.props.brew.authors || this.props.brew.authors.length == 0) return 'No authors';
return <>
{this.props.brew.authors.map((author, idx, arr)=>{
let spacer = <span>, </span>;
if(arr.length - 1 == idx) spacer = <></>;
const spacer = arr.length - 1 == idx ? <></> : <span>, </span>;
return <span key={idx}><a className='userPageLink' href={`/user/${author}`}>{author}</a>{spacer}</span>;
})}
</>;