feat: Implement S3 avatar resolution for network connections, refine messaging initial conversation selection, and adjust profile display logic and header navigation.
This commit is contained in:
@@ -265,12 +265,14 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
|
||||
const location = getLocation();
|
||||
const expertiseTags = getExpertiseTags();
|
||||
const description = getDescription();
|
||||
const truncatedDescription = description && description.length > 200
|
||||
? description.slice(0, 200) + '...'
|
||||
const maxDescLength = 150;
|
||||
const truncatedDescription = description && description.length > maxDescLength
|
||||
? description.slice(0, maxDescLength) + '...'
|
||||
: description || '';
|
||||
const INITIAL_TAG_COUNT = 6;
|
||||
|
||||
return (
|
||||
<div className="bg-white rounded-[20px] p-4 sm:p-5 flex flex-col sm:flex-row gap-4 sm:gap-5 shadow-[0px_10px_20px_rgba(217,217,217,0.5)]">
|
||||
<div className="bg-white rounded-[20px] p-4 sm:p-5 flex flex-col sm:flex-row gap-4 sm:gap-5 shadow-[0px_10px_20px_rgba(217,217,217,0.5)] min-h-[280px]">
|
||||
{/* Profile Image & View Profile Button */}
|
||||
<div className="flex-shrink-0 flex flex-col items-center">
|
||||
<ProfileImage
|
||||
@@ -355,7 +357,7 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
|
||||
<div className="mt-3">
|
||||
<p className="font-serif text-[13px] text-[#00293d] leading-[20px]">
|
||||
{showFullBio ? description : truncatedDescription}
|
||||
{description.length > 200 && (
|
||||
{description.length > maxDescLength && (
|
||||
<>
|
||||
{' '}
|
||||
<button
|
||||
@@ -375,7 +377,7 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
|
||||
<div className="mt-3">
|
||||
<p className="font-fractul font-bold text-[14px] text-[#00293d] mb-2">Expertise:</p>
|
||||
<div className="flex flex-wrap gap-2 items-center">
|
||||
{(showAllTags ? expertiseTags : expertiseTags.slice(0, 8)).map((tag, index) => (
|
||||
{(showAllTags ? expertiseTags : expertiseTags.slice(0, INITIAL_TAG_COUNT)).map((tag, index) => (
|
||||
<span
|
||||
key={index}
|
||||
className="border border-[#00293d] rounded-[15px] px-3 py-1 font-serif text-[14px] text-[#00293d]"
|
||||
@@ -383,12 +385,12 @@ function ProfileCard({ profile, resolvedAvatarUrl }: ProfileCardProps) {
|
||||
{tag}
|
||||
</span>
|
||||
))}
|
||||
{expertiseTags.length > 8 && (
|
||||
{expertiseTags.length > INITIAL_TAG_COUNT && (
|
||||
<button
|
||||
onClick={() => setShowAllTags(!showAllTags)}
|
||||
className="font-serif font-bold text-[14px] text-[#00293d] underline ml-1"
|
||||
className="border border-[#e58625] rounded-[15px] px-3 py-1 font-serif text-[14px] text-[#e58625] hover:bg-[#e58625]/10 transition-colors"
|
||||
>
|
||||
{showAllTags ? 'Show Less' : `+${expertiseTags.length - 8} more`}
|
||||
{showAllTags ? 'Show Less' : `+${expertiseTags.length - INITIAL_TAG_COUNT} more`}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user