diff options
| author | polwex <polwex@sortug.com> | 2025-11-19 05:47:30 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-11-19 05:47:30 +0700 |
| commit | 74d84cb2f22600b6246343e9ea606cf0db7517f0 (patch) | |
| tree | 0d68285c8e74e6543645e17ab2751d543c1ff9a6 /gui/src/components/profile/Profile.tsx | |
| parent | e6e657be3a3b1dae426b46f3bc16f9a5cf4861c2 (diff) | |
Big GUI improvements on Nostr rendering and fetchingpolwex/iris
Diffstat (limited to 'gui/src/components/profile/Profile.tsx')
| -rw-r--r-- | gui/src/components/profile/Profile.tsx | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/gui/src/components/profile/Profile.tsx b/gui/src/components/profile/Profile.tsx index ab65a7b..a554696 100644 --- a/gui/src/components/profile/Profile.tsx +++ b/gui/src/components/profile/Profile.tsx @@ -3,6 +3,7 @@ import type { UserProfile, UserType } from "@/types/nostrill"; import useLocalState from "@/state/state"; import Avatar from "../Avatar"; import ProfileEditor from "./Editor"; +import { ProfValue } from "../modals/UserModal"; interface Props { user: UserType; @@ -15,8 +16,9 @@ const Loader: React.FC<Props> = (props) => { const { profiles } = useLocalState((s) => ({ profiles: s.profiles, })); - const profile = profiles.get(props.userString); - console.log({ profiles }); + const { user } = props; + const userString2 = "urbit" in user ? user.urbit : user.nostr; + const profile = profiles.get(userString2); if (props.isMe) return <ProfileEditor {...props} profile={profile} />; else return <Profile profile={profile} {...props} />; @@ -63,17 +65,10 @@ function Profile({ {customFields.map(([key, value], index) => { if (key.toLocaleLowerCase() === "banner") return null; - const isURL = URL.parse(value); return ( <div key={index} className="custom-field-view"> <span className="field-key">{key}:</span> - {isURL ? ( - <a className="field-value" href={value} target="_blank"> - {value} - </a> - ) : ( - <span className="field-value">{value}</span> - )} + <ProfValue value={value} /> </div> ); })} |
