0.3.0.2
This commit is contained in:
@@ -86,6 +86,10 @@ const MemberCard = memo(function MemberCard({
|
||||
: null
|
||||
const spouseName = spouse ? spouse.fullName : null
|
||||
|
||||
// 获取父母信息
|
||||
const father = member.fatherId ? allMembers.find(m => m.id === member.fatherId) : null
|
||||
const mother = member.motherId ? allMembers.find(m => m.id === member.motherId) : null
|
||||
|
||||
return (
|
||||
<div className="relative group">
|
||||
<Link href={`/members/${member.id}${typeof window !== 'undefined' ? window.location.search : ''}`}>
|
||||
@@ -118,6 +122,45 @@ const MemberCard = memo(function MemberCard({
|
||||
</span>
|
||||
)}
|
||||
</h3>
|
||||
{/* 父母信息 - 放在姓名右侧 */}
|
||||
{(father || mother) && (
|
||||
<div className="flex items-center gap-1 text-xs text-muted-foreground flex-shrink-0">
|
||||
<span className="text-muted-foreground/70">父母:</span>
|
||||
{father && (
|
||||
<span
|
||||
className="hover:text-primary hover:underline cursor-pointer"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
window.location.href = `/members/${father.id}${window.location.search}`
|
||||
}}
|
||||
>
|
||||
<MemberNameWithStatus
|
||||
name={father.fullName}
|
||||
isDead={!!father.deathDate}
|
||||
dotPosition="top-left"
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
{father && mother && <span className="text-muted-foreground/50">·</span>}
|
||||
{mother && (
|
||||
<span
|
||||
className="hover:text-primary hover:underline cursor-pointer"
|
||||
onClick={(e) => {
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
window.location.href = `/members/${mother.id}${window.location.search}`
|
||||
}}
|
||||
>
|
||||
<MemberNameWithStatus
|
||||
name={mother.fullName}
|
||||
isDead={!!mother.deathDate}
|
||||
dotPosition="top-left"
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
{isFounder ? (
|
||||
<p className="text-xs text-amber-700 font-semibold mt-0.5 truncate">
|
||||
|
||||
Reference in New Issue
Block a user