From 74d84cb2f22600b6246343e9ea606cf0db7517f0 Mon Sep 17 00:00:00 2001
From: polwex <polwex@sortug.com>
Date: Wed, 19 Nov 2025 05:47:30 +0700
Subject: Big GUI improvements on Nostr rendering and fetching

---
 gui/src/components/profile/Profile.tsx | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

(limited to 'gui/src/components/profile/Profile.tsx')

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>
               );
             })}
-- 
cgit v1.2.3

