- {fetchedEvent ? (
- <>
-
- {eventAuthorProfile?.avatar && (
-

{
- e.currentTarget.style.display = 'none'
- }}
- />
- )}
-
•
-
{eventTypeName}
- >
- ) : (
-
- {isFetchingEventFinal ? 'Loading event...' : 'Event'}
-
- )}
+
+ {fetchedEvent ? (
+ <>
+
+ {eventAuthorProfile?.avatar && (
+

{
+ e.currentTarget.style.display = 'none'
+ }}
+ />
+ )}
+
•
+
{eventTypeName}
+ >
+ ) : (
+
+ {isFetchingEventFinal ? 'Loading event...' : 'Event'}
+
+ )}
+
e.stopPropagation()}
- className="ml-auto"
+ className="flex-shrink-0"
>
-
+
{fetchedEvent && (
@@ -593,7 +595,7 @@ export default function WebPreview({ url, className }: { url: string; className?
target="_blank"
rel="noopener noreferrer"
onClick={(e) => e.stopPropagation()}
- className="text-xs text-muted-foreground truncate block hover:underline"
+ className="text-xs text-muted-foreground truncate block hover:underline break-all"
>
{truncatedUrl}
@@ -609,10 +611,10 @@ export default function WebPreview({ url, className }: { url: string; className?
return (
{fetchedProfile?.avatar && (
-
+
)}
-
+
- {fetchedProfile ? (
- <>
-
- {fetchedProfile.nip05 && (
- <>
-
•
-
{fetchedProfile.nip05}
- >
- )}
- >
- ) : (
-
- {isFetchingProfile ? 'Loading profile...' : 'Profile'}
-
- )}
+
+ {fetchedProfile ? (
+ <>
+
+ {fetchedProfile.nip05 && (
+ <>
+ •
+ {fetchedProfile.nip05}
+ >
+ )}
+ >
+ ) : (
+
+ {isFetchingProfile ? 'Loading profile...' : 'Profile'}
+
+ )}
+
e.stopPropagation()}
- className="ml-auto"
+ className="flex-shrink-0"
>
-
+
{fetchedProfile?.about && (
-
{fetchedProfile.about}
+
{fetchedProfile.about}
)}
e.stopPropagation()}
- className="text-xs text-muted-foreground truncate block hover:underline"
+ className="text-xs text-muted-foreground truncate block hover:underline break-all"
>
{truncatedUrl}
@@ -668,18 +672,19 @@ export default function WebPreview({ url, className }: { url: string; className?
// Basic fallback for non-nostr URLs - show site information
return (
-
+
@@ -702,34 +707,35 @@ export default function WebPreview({ url, className }: { url: string; className?
if (isSmallScreen && image) {
// Small screen: always use horizontal layout with image on left
return (
-
+
1 ? "w-[320px]" : "w-40"
+ ogImageAspectRatio !== null && ogImageAspectRatio > 1 ? "w-24 max-w-[120px]" : "w-20 max-w-[80px]"
)}>
-
+
- {title &&
{title}
}
- {!title && description &&
{description}
}
+ {title &&
{title}
}
+ {!title && description &&
{description}
}
e.stopPropagation()}
- className="text-xs text-muted-foreground truncate block hover:underline"
+ className="text-xs text-muted-foreground truncate block hover:underline break-all"
>
{url}
@@ -740,11 +746,11 @@ export default function WebPreview({ url, className }: { url: string; className?
// Render all OG images on left side, crop wider ones
return (
-
+
{image && (
1 ? "w-[416px]" : "w-52"
+ ogImageAspectRatio !== null && ogImageAspectRatio > 1 ? "w-32 sm:w-52 md:w-[416px]" : "w-20 sm:w-40 md:w-52"
)}>
)}
-
+
{title &&
{title}
}
@@ -780,7 +787,7 @@ export default function WebPreview({ url, className }: { url: string; className?
target="_blank"
rel="noopener noreferrer"
onClick={(e) => e.stopPropagation()}
- className="text-xs text-muted-foreground truncate block hover:underline"
+ className="text-xs text-muted-foreground truncate block hover:underline break-all"
>
{url}