more fixes
This commit is contained in:
@@ -102,9 +102,12 @@ function StatsCard({ stats, followerCount, user, onTabChange }) {
|
||||
function AboutCard({ user, profile, socialLinks, countryName }) {
|
||||
const bio = profile?.bio || profile?.about || profile?.description
|
||||
const website = profile?.website || user?.website
|
||||
const joined = user?.created_at
|
||||
? new Date(user.created_at).toLocaleDateString('en-US', { month: 'long', year: 'numeric' })
|
||||
: null
|
||||
|
||||
const hasSocials = socialLinks && Object.keys(socialLinks).length > 0
|
||||
const hasContent = bio || countryName || website || hasSocials
|
||||
const hasContent = bio || countryName || website || joined || hasSocials
|
||||
|
||||
if (!hasContent) return null
|
||||
|
||||
@@ -119,12 +122,21 @@ function AboutCard({ user, profile, socialLinks, countryName }) {
|
||||
{countryName && (
|
||||
<div className="flex items-center gap-2 text-[13px] text-slate-400">
|
||||
<i className="fa-solid fa-location-dot fa-fw text-slate-600 text-xs" />
|
||||
<span>{countryName}</span>
|
||||
<span className="text-slate-500">Location</span>
|
||||
<span className="text-slate-300">{countryName}</span>
|
||||
</div>
|
||||
)}
|
||||
{joined && (
|
||||
<div className="flex items-center gap-2 text-[13px] text-slate-400">
|
||||
<i className="fa-solid fa-calendar-days fa-fw text-slate-600 text-xs" />
|
||||
<span className="text-slate-500">Joined</span>
|
||||
<span className="text-slate-300">{joined}</span>
|
||||
</div>
|
||||
)}
|
||||
{website && (
|
||||
<div className="flex items-center gap-2 text-[13px]">
|
||||
<i className="fa-solid fa-link fa-fw text-slate-600 text-xs" />
|
||||
<span className="text-slate-500">Website</span>
|
||||
<a
|
||||
href={website.startsWith('http') ? website : `https://${website}`}
|
||||
target="_blank"
|
||||
@@ -365,13 +377,6 @@ export default function FeedSidebar({
|
||||
}) {
|
||||
return (
|
||||
<div className="space-y-4">
|
||||
<StatsCard
|
||||
stats={stats}
|
||||
followerCount={followerCount}
|
||||
user={user}
|
||||
onTabChange={onTabChange}
|
||||
/>
|
||||
|
||||
<AboutCard
|
||||
user={user}
|
||||
profile={profile}
|
||||
@@ -379,6 +384,13 @@ export default function FeedSidebar({
|
||||
countryName={countryName}
|
||||
/>
|
||||
|
||||
<StatsCard
|
||||
stats={stats}
|
||||
followerCount={followerCount}
|
||||
user={user}
|
||||
onTabChange={onTabChange}
|
||||
/>
|
||||
|
||||
<RecentFollowersCard
|
||||
recentFollowers={recentFollowers}
|
||||
followerCount={followerCount}
|
||||
|
||||
@@ -196,7 +196,7 @@ export default function PostComposer({ user, onPosted }) {
|
||||
loading="lazy"
|
||||
/>
|
||||
<span className="text-sm text-slate-500 flex-1 bg-white/[0.04] rounded-xl px-4 py-2.5 hover:bg-white/[0.07] transition-colors">
|
||||
What's on your mind, {user.name?.split(' ')[0] ?? user.username}?
|
||||
Share an update with your followers.
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
@@ -229,7 +229,7 @@ export default function PostComposer({ user, onPosted }) {
|
||||
onChange={handleBodyChange}
|
||||
maxLength={2000}
|
||||
rows={3}
|
||||
placeholder="What's on your mind?"
|
||||
placeholder="Share an update with your followers."
|
||||
autoFocus
|
||||
className="w-full bg-white/5 border border-white/10 rounded-xl px-3 py-2.5 text-sm text-white resize-none placeholder-slate-600 focus:outline-none focus:border-sky-500/50 transition-colors"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user