fix React classes

This commit is contained in:
f0x 2023-05-10 21:16:22 +02:00
parent ba8c0cd4bb
commit 4e5278d215
1 changed files with 8 additions and 8 deletions

View File

@ -24,22 +24,22 @@ const React = require("react");
module.exports = function FakeProfile({ avatar, header, display_name, username, role }) { module.exports = function FakeProfile({ avatar, header, display_name, username, role }) {
return ( // Keep in sync with web/template/profile.tmpl return ( // Keep in sync with web/template/profile.tmpl
<div className="profile"> <div className="profile">
<div class="header"> <div className="header">
<div class="header-image"> <div className="header-image">
<img src={header} alt={header ? `header image for ${username}` : "None set"} /> <img src={header} alt={header ? `header image for ${username}` : "None set"} />
</div> </div>
<div class="basic-info" aria-hidden="true"> <div className="basic-info" aria-hidden="true">
<a class="avatar" href="{{.account.Avatar}}"> <a className="avatar" href="{{.account.Avatar}}">
<img src={avatar} alt={avatar ? `avatar image for ${username}` : "None set"} /> <img src={avatar} alt={avatar ? `avatar image for ${username}` : "None set"} />
</a> </a>
<span class="displayname text-cutoff"> <span className="displayname text-cutoff">
{display_name.trim().length > 0 ? display_name : username} {display_name.trim().length > 0 ? display_name : username}
<span class="sr-only">.</span> <span className="sr-only">.</span>
</span> </span>
<span class="username text-cutoff">@{username}</span> <span className="username text-cutoff">@{username}</span>
{(role && role != "user") && {(role && role != "user") &&
<div className={`role ${role}`}> <div className={`role ${role}`}>
<span class="sr-only">Role: </span>{role} <span className="sr-only">Role: </span>{role}
</div> </div>
} }
</div> </div>