0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

title attribute to hidden authors

This commit is contained in:
Víctor Losada Hernández
2024-08-31 23:21:14 +02:00
parent 47d8bb20d2
commit c528c8639a

View File

@@ -145,9 +145,9 @@ const BrewItem = createClass({
{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"
<span title="This username had an email in it, so we hid it to keep the user's privacy, sorry">&nbsp;{author}</span>
) : (
<a href={`/user/${author}`}>{author}</a> // Render as a link if not "hidden"
<a href={`/user/${author}`}>{author}</a>
)}
{index < brew.authors.length - 1 && ', '}
</React.Fragment>