diff --git a/src/components/Person/Person.jsx b/src/components/Person/Person.jsx index b754d7a59..d5d3cbf44 100644 --- a/src/components/Person/Person.jsx +++ b/src/components/Person/Person.jsx @@ -1,17 +1,17 @@ -export const Person = ({ person }) => ( -
I am {person.age}
} -- {person.isMarried && - person.sex === 'm' && - `${person.partnerName} is my wife`} - {person.isMarried && - person.sex === 'f' && - `${person.partnerName} is my husband`} - {!person.isMarried && `I am not married`} -
-I am {person.age}
} ++ {person.isMarried + ? `${person.partnerName} is my ${partner}` + : 'I am not married'} +
+