last notes opacity, avoid profile linking
This commit is contained in:
parent
4cd174092a
commit
05a024e985
@ -18,6 +18,7 @@ export interface ProfileImageProps {
|
||||
link?: string;
|
||||
defaultNip?: string;
|
||||
verifyNip?: boolean;
|
||||
linkToProfile?: boolean;
|
||||
}
|
||||
|
||||
export default function ProfileImage({
|
||||
@ -28,6 +29,7 @@ export default function ProfileImage({
|
||||
link,
|
||||
defaultNip,
|
||||
verifyNip,
|
||||
linkToProfile = true,
|
||||
}: ProfileImageProps) {
|
||||
const navigate = useNavigate();
|
||||
const user = useUserProfile(pubkey);
|
||||
@ -42,10 +44,16 @@ export default function ProfileImage({
|
||||
link = "#";
|
||||
}
|
||||
|
||||
const onAvatarClick = () => {
|
||||
if (linkToProfile) {
|
||||
navigate(link ?? profileLink(pubkey));
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className={`pfp${className ? ` ${className}` : ""}`}>
|
||||
<div className="avatar-wrapper">
|
||||
<Avatar user={user} onClick={() => navigate(link ?? profileLink(pubkey))} />
|
||||
<Avatar user={user} onClick={onAvatarClick} />
|
||||
</div>
|
||||
{showUsername && (
|
||||
<div className="profile-name">
|
||||
|
@ -15,6 +15,7 @@
|
||||
box-shadow: 0px 0px 15px rgba(78, 0, 255, 0.6);
|
||||
border-radius: 100px;
|
||||
z-index: 42;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
|
@ -89,7 +89,7 @@ export default function Timeline({
|
||||
{latestFeed.length > 0 && (
|
||||
<div className="card latest-notes pointer" onClick={() => showLatest()}>
|
||||
{latestAuthors.slice(0, 3).map(p => {
|
||||
return <ProfileImage pubkey={p} showUsername={false} />;
|
||||
return <ProfileImage pubkey={p} showUsername={false} linkToProfile={false} />;
|
||||
})}
|
||||
<FormattedMessage
|
||||
defaultMessage="{n} new {n, plural, =1 {note} other {notes}}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user