From 763b74ef31607dc725f54e5439ef549d90e0e51a Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Thu, 22 Jan 2026 14:04:07 +0100 Subject: [PATCH] Show no kids in profile about --- web/components/profile-about.tsx | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/web/components/profile-about.tsx b/web/components/profile-about.tsx index 89626172..f98cc9b1 100644 --- a/web/components/profile-about.tsx +++ b/web/components/profile-about.tsx @@ -356,13 +356,23 @@ function LastOnline(props: { lastOnlineTime?: string }) { function HasKids(props: { profile: Profile }) { const t = useT() const {profile} = props - const hasKidsText = - profile.has_kids && profile.has_kids > 0 - ? profile.has_kids > 1 - ? t('profile.has_kids_many', 'Has {count} kids', {count: profile.has_kids}) - : t('profile.has_kids_one', 'Has {count} kid', {count: profile.has_kids}) - : null - return } text={hasKidsText}/> + if (typeof profile.has_kids !== 'number') return null + const hasKidsText = profile.has_kids == 0 + ? t('profile.has_kids.doesnt_have_kids', 'Does not have children') + : profile.has_kids > 1 + ? t('profile.has_kids_many', 'Has {count} kids', {count: profile.has_kids}) + : t('profile.has_kids_one', 'Has {count} kid', {count: profile.has_kids}) + const faChild = + const icon = profile.has_kids === 0 ? ( +
+ {faChild} +
+ {/*
*/} +
+
+
+ ) : faChild + return } export const formatProfileValue = (key: string, value: any) => {