mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 20:52:40 +00:00
Move from let to const
This commit is contained in:
@@ -32,8 +32,7 @@ const MetadataNav = createClass({
|
|||||||
if(!this.props.brew.authors || this.props.brew.authors.length == 0) return 'No authors';
|
if(!this.props.brew.authors || this.props.brew.authors.length == 0) return 'No authors';
|
||||||
return <>
|
return <>
|
||||||
{this.props.brew.authors.map((author, idx, arr)=>{
|
{this.props.brew.authors.map((author, idx, arr)=>{
|
||||||
let spacer = <span>, </span>;
|
const spacer = arr.length - 1 == idx ? <></> : <span>, </span>;
|
||||||
if(arr.length - 1 == idx) spacer = <></>;
|
|
||||||
return <span key={idx}><a className='userPageLink' href={`/user/${author}`}>{author}</a>{spacer}</span>;
|
return <span key={idx}><a className='userPageLink' href={`/user/${author}`}>{author}</a>{spacer}</span>;
|
||||||
})}
|
})}
|
||||||
</>;
|
</>;
|
||||||
|
|||||||
Reference in New Issue
Block a user