note to self fix

This commit is contained in:
Alejandro Gomez 2023-02-14 01:14:38 +01:00 committed by Kieran
parent 1b8d7354fe
commit 54f33ddf7c
No known key found for this signature in database
GPG Key ID: DE71CEB3925BE941
2 changed files with 10 additions and 7 deletions

View File

@ -3,8 +3,6 @@ import { Link, useNavigate } from "react-router-dom";
import { FormattedMessage } from "react-intl"; import { FormattedMessage } from "react-intl";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faBook, faCertificate } from "@fortawesome/free-solid-svg-icons"; import { faBook, faCertificate } from "@fortawesome/free-solid-svg-icons";
import { useUserProfile } from "Feed/ProfileFeed";
import Nip05 from "Element/Nip05";
import { profileLink } from "Util"; import { profileLink } from "Util";
import messages from "./messages"; import messages from "./messages";
@ -16,12 +14,10 @@ export interface NoteToSelfProps {
link?: string; link?: string;
} }
function NoteLabel({ pubkey }: NoteToSelfProps) { function NoteLabel() {
const user = useUserProfile(pubkey);
return ( return (
<div> <div>
<FormattedMessage {...messages.NoteToSelf} /> <FontAwesomeIcon icon={faCertificate} size="xs" /> <FormattedMessage {...messages.NoteToSelf} /> <FontAwesomeIcon icon={faCertificate} size="xs" />
{user?.nip05 && <Nip05 nip05={user.nip05} pubkey={user.pubkey} />}
</div> </div>
); );
} }
@ -46,9 +42,9 @@ export default function NoteToSelf({ pubkey, clickable, className, link }: NoteT
<div className="name"> <div className="name">
{(clickable && ( {(clickable && (
<Link to={link ?? profileLink(pubkey)}> <Link to={link ?? profileLink(pubkey)}>
<NoteLabel pubkey={pubkey} /> <NoteLabel />
</Link> </Link>
)) || <NoteLabel pubkey={pubkey} />} )) || <NoteLabel />}
</div> </div>
</div> </div>
</div> </div>

View File

@ -56,6 +56,13 @@ header .pfp .avatar-wrapper {
right: 8px; right: 8px;
} }
@media (max-width: 520px) {
.header-actions .btn-rnd .has-unread {
top: 6px;
right: 6px;
}
}
.search { .search {
margin: 0 10px 0 10px; margin: 0 10px 0 10px;
} }