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