From 836d5509c53becc793e28387696214df59871b16 Mon Sep 17 00:00:00 2001 From: Pavlo Date: Thu, 5 Dec 2024 20:26:49 +0200 Subject: [PATCH] add task solution --- src/components/Person/Person.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Person/Person.jsx b/src/components/Person/Person.jsx index c2520f6aa..25c777cc5 100644 --- a/src/components/Person/Person.jsx +++ b/src/components/Person/Person.jsx @@ -4,17 +4,19 @@ export const Person = ({ person }) => { if (person.sex === 'm') { partner = 'wife'; } else { - partner = 'husbant'; + partner = 'husband'; } return (

My name is {person.name}

{person.age &&

I am {person.age}

} - {person.isMarried === true && ( + {person.isMarried === true ? (

{person.partnerName} is my {partner}

+ ) : ( +

I am not married

)}
);