goToProfile & verified badge

This commit is contained in:
srgooglo 2022-03-11 01:05:30 +01:00
parent 0634e24b8c
commit 9d99ad4002
2 changed files with 12 additions and 1 deletions

View File

@ -12,6 +12,10 @@ import "./index.less"
function PostHeader(props) {
const [timeAgo, setTimeAgo] = React.useState(0)
const goToProfile = () => {
window.app.goToAccount(props.postData.user?.username)
}
const updateTimeAgo = () => {
setTimeAgo(moment(props.postData.created_at ?? "").fromNow())
}
@ -35,8 +39,9 @@ function PostHeader(props) {
</div>
<div className="info">
<div>
<h1>
<h1 onClick={goToProfile}>
{props.postData.user?.fullName ?? `@${props.postData.user?.username}`}
{props.postData.user?.verified && <Icons.verifiedBadge />}
</h1>
</div>

View File

@ -47,6 +47,11 @@
margin-right: 10px;
}
svg {
fill: var(--appColor);
margin-left: 6px;
}
.info {
display : inline-flex;
flex-direction : column;
@ -64,6 +69,7 @@
margin : 0;
font-family: "DM Mono", monospace;
align-self : start;
cursor: pointer;
}
>div {