mirror of
https://github.com/CompassConnections/Compass.git
synced 2026-07-30 17:59:13 -04:00
Update kids filters logic for clarity and consistency in label rendering
This commit is contained in:
@@ -33,8 +33,9 @@ export function HasKidsLabel(props: {
|
||||
<Row className="items-center gap-0.5">
|
||||
{/*<FaChild className="h-4 w-4" />*/}
|
||||
<span className={clsx(highlightedClass, has_kids !== DEFAULT_KEY && 'font-semibold')}>
|
||||
{has_kids === DEFAULT_KEY && t('filter.label.has_kids', 'Kids') + ': '}
|
||||
{t(`profile.has_kids.${labelKey}`, labelValue)}
|
||||
{has_kids === DEFAULT_KEY
|
||||
? t('filter.label.has_kids', 'Kids')
|
||||
: t(`profile.has_kids.${labelKey}`, labelValue)}
|
||||
</span>
|
||||
</Row>
|
||||
)
|
||||
|
||||
@@ -62,7 +62,7 @@ export function KidsLabel(props: {strength: number; highlightedClass?: string; m
|
||||
const wantsKidsLabelsWithIcon = useWantsKidsLabelsWithIcon()
|
||||
const t = useT()
|
||||
|
||||
const strength = props.strength ? Number(props.strength) : DEFAULT_KEY
|
||||
const strength = props.strength != null ? Number(props.strength) : DEFAULT_KEY
|
||||
|
||||
return (
|
||||
<Row className="items-center gap-0.5">
|
||||
@@ -73,12 +73,13 @@ export function KidsLabel(props: {strength: number; highlightedClass?: string; m
|
||||
highlightedClass,
|
||||
)}
|
||||
>
|
||||
{strength === DEFAULT_KEY && t('filter.label.wants_kids_strength', 'Wants Kids') + ': '}
|
||||
{strength == wantsKidsLabelsWithIcon.no_preference.strength
|
||||
? wantsKidsLabelsWithIcon.no_preference.name
|
||||
: strength == wantsKidsLabelsWithIcon.wants_kids.strength
|
||||
? wantsKidsLabelsWithIcon.wants_kids.name
|
||||
: wantsKidsLabelsWithIcon.doesnt_want_kids.name}
|
||||
{strength === DEFAULT_KEY
|
||||
? t('filter.label.wants_kids_strength', 'Desire for Kids')
|
||||
: strength == wantsKidsLabelsWithIcon.no_preference.strength
|
||||
? wantsKidsLabelsWithIcon.no_preference.name
|
||||
: strength == wantsKidsLabelsWithIcon.wants_kids.strength
|
||||
? wantsKidsLabelsWithIcon.wants_kids.name
|
||||
: wantsKidsLabelsWithIcon.doesnt_want_kids.name}
|
||||
</span>
|
||||
</Row>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user