diff --git a/packages/app/src/Element/User/ProfileLink.tsx b/packages/app/src/Element/User/ProfileLink.tsx index 7d9de1a8..a157e3c6 100644 --- a/packages/app/src/Element/User/ProfileLink.tsx +++ b/packages/app/src/Element/User/ProfileLink.tsx @@ -7,14 +7,12 @@ import { randomSample } from "@/SnortUtils"; export function ProfileLink({ pubkey, user, - link, explicitLink, children, ...others }: { pubkey: string; user?: UserMetadata | MetadataCache; - link?: NostrLink; explicitLink?: string; children?: ReactNode; } & Omit) { @@ -27,27 +25,21 @@ export function ProfileLink({ if (explicitLink) { return explicitLink; } - if (user) { - if ( - user.nip05 && - user.nip05.endsWith(`@${CONFIG.nip05Domain}`) && - (!("isNostrAddressValid" in user) || user.isNostrAddressValid) - ) { - const [username] = user.nip05.split("@"); - return `/${username}`; - } - return `/${new NostrLink( - NostrPrefix.Profile, - pubkey, - undefined, - undefined, - relays ? randomSample(relays, 3) : undefined, - ).encode(CONFIG.profileLinkPrefix)}`; + if ( + user?.nip05 && + user.nip05.endsWith(`@${CONFIG.nip05Domain}`) && + (!("isNostrAddressValid" in user) || user.isNostrAddressValid) + ) { + const [username] = user.nip05.split("@"); + return `/${username}`; } - if (link && (link.type === NostrPrefix.Profile || link.type === NostrPrefix.PublicKey)) { - return `/${link.encode()}`; - } - return "#"; + return `/${new NostrLink( + NostrPrefix.Profile, + pubkey, + undefined, + undefined, + relays ? randomSample(relays, 3) : undefined, + ).encode(CONFIG.profileLinkPrefix)}`; } const oFiltered = others as Record; diff --git a/packages/app/src/Pages/Profile/ProfilePage.tsx b/packages/app/src/Pages/Profile/ProfilePage.tsx index acb7d730..0edc2d02 100644 --- a/packages/app/src/Pages/Profile/ProfilePage.tsx +++ b/packages/app/src/Pages/Profile/ProfilePage.tsx @@ -24,7 +24,7 @@ import useFollowsFeed from "@/Feed/FollowsFeed"; import useProfileBadges from "@/Feed/BadgesFeed"; import useModeration from "@/Hooks/useModeration"; import FollowButton from "@/Element/User/FollowButton"; -import { parseId, hexToBech32 } from "@/SnortUtils"; +import { parseId } from "@/SnortUtils"; import Avatar from "@/Element/User/Avatar"; import Timeline from "@/Element/Feed/Timeline"; import Text from "@/Element/Text"; @@ -61,7 +61,6 @@ import { useMuteList, usePinList } from "@/Hooks/useLists"; import messages from "../messages"; import FollowDistanceIndicator from "@/Element/User/FollowDistanceIndicator"; -import classNames from "classnames"; import { ProfileLink } from "@/Element/User/ProfileLink"; interface ProfilePageProps { @@ -84,7 +83,6 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) { const [showProfileQr, setShowProfileQr] = useState(false); const [modalImage, setModalImage] = useState(""); const aboutText = user?.about || ""; - const npub = !id?.startsWith(NostrPrefix.PublicKey) ? hexToBech32(NostrPrefix.PublicKey, id || undefined) : id; const lnurl = (() => { try { @@ -168,22 +166,26 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) { {user?.nip05 && }
- {user?.pubkey && } +
+ {user?.pubkey && } + {followedByFriendsArray.map((a, index) => { + const zIndex = followedByFriendsArray.length - index; + + return ( +
0 ? "-ml-5" : ""}`} key={a} style={{ zIndex }}> + +
+ ); + })} +
{followedByFriends.size > 0 && (
- {followedByFriendsArray.map((a, index) => { - return ( - 0 }, "inline-block")} key={a}> - - - ); - })} {followedByFriendsArray.map((a, index) => ( - + {index < followedByFriendsArray.length - 1 && ","}{" "} @@ -204,9 +206,7 @@ export default function ProfilePage({ id: propId, state }: ProfilePageProps) {
{showBadges && } {showStatus && <>{musicStatus()}} -
- {links()} -
+
{links()}
); } diff --git a/packages/app/src/lang.json b/packages/app/src/lang.json index 50d1716b..74b6f489 100644 --- a/packages/app/src/lang.json +++ b/packages/app/src/lang.json @@ -404,9 +404,6 @@ "DZzCem": { "defaultMessage": "Show latest {n} notes" }, - "DcL8P+": { - "defaultMessage": "Supporter" - }, "Dh3hbq": { "defaultMessage": "Auto Zap" }, @@ -537,6 +534,9 @@ "IKKHqV": { "defaultMessage": "Follows" }, + "IOu4Xh": { + "defaultMessage": "You must be a {tier} subscriber to access {app} deck" + }, "IVbtTS": { "defaultMessage": "Zap all {n} sats" }, @@ -1525,6 +1525,9 @@ "xmcVZ0": { "defaultMessage": "Search" }, + "xybOUv": { + "defaultMessage": "FAN" + }, "y1Z3or": { "defaultMessage": "Language" }, diff --git a/packages/app/src/translations/en.json b/packages/app/src/translations/en.json index 1566b21a..fff4235a 100644 --- a/packages/app/src/translations/en.json +++ b/packages/app/src/translations/en.json @@ -133,7 +133,6 @@ "DBiVK1": "Cache", "DKnriN": "Send sats", "DZzCem": "Show latest {n} notes", - "DcL8P+": "Supporter", "Dh3hbq": "Auto Zap", "Dn82AL": "Live", "DtYelJ": "Transfer", @@ -177,6 +176,7 @@ "HhcAVH": "You don't follow this person, click here to load media from {link}, or update your preferences to always load media from everybody.", "IEwZvs": "Are you sure you want to unpin this note?", "IKKHqV": "Follows", + "IOu4Xh": "You must be a {tier} subscriber to access {app} deck", "IVbtTS": "Zap all {n} sats", "IWz1ta": "Auto Translate", "Ig9/a1": "Sent {n} sats to {name}", @@ -502,6 +502,7 @@ "xhQMeQ": "Expires", "xl4s/X": "Additional Terms:", "xmcVZ0": "Search", + "xybOUv": "FAN", "y1Z3or": "Language", "yCLnBC": "LNURL or Lightning Address", "yNBPJp": "Help fund the development of {site}",