mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-11 06:52:38 +00:00
hide usernames with emails
This commit is contained in:
@@ -141,11 +141,17 @@ const BrewItem = createClass({
|
||||
</> : <></>
|
||||
}
|
||||
<span title={`Authors:\n${brew.authors?.join('\n')}`}>
|
||||
<i className='fas fa-user'/> {brew.authors?.map((author, index)=>(
|
||||
<>
|
||||
<a key={index} href={`/user/${author}`}>{author}</a>
|
||||
{index < brew.authors.length - 1 && ', '}
|
||||
</>))}
|
||||
<i className='fas fa-user'/>
|
||||
{brew.authors?.map((author, index) => (
|
||||
<React.Fragment key={index}>
|
||||
{author === 'hidden' ? (
|
||||
<span>{author}</span> // Render as plain text if the author's name is "hidden"
|
||||
) : (
|
||||
<a href={`/user/${author}`}>{author}</a> // Render as a link if not "hidden"
|
||||
)}
|
||||
{index < brew.authors.length - 1 && ', '}
|
||||
</React.Fragment>
|
||||
))}
|
||||
</span>
|
||||
<br />
|
||||
<span title={`Last viewed: ${moment(brew.lastViewed).local().format(dateFormatString)}`}>
|
||||
|
||||
Reference in New Issue
Block a user