mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 18:44:16 +00:00
goToProfile & verified badge
This commit is contained in:
parent
0634e24b8c
commit
9d99ad4002
@ -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>
|
||||
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user