Skip to content

Commit

Permalink
Changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiKuz committed Aug 23, 2023
1 parent c4370bc commit b2c84e3
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/components/Person/Person.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const MALE = 'm';
const WIFE = 'wife';
const HUSBAND = 'husband';

export const Person = ({ person }) => {
const {
name,
Expand All @@ -7,11 +11,7 @@ export const Person = ({ person }) => {
isMarried,
} = person;

const MALE = 'm';
const WIFE = 'wife';
const HUSBAND = 'husband';

const partner = sex === MALE ? WIFE : HUSBAND;
const merriageStatusInfo = sex === MALE ? WIFE : HUSBAND;

return (
<section className="Person">
Expand All @@ -27,7 +27,7 @@ export const Person = ({ person }) => {

<p className="Person__partner">
{isMarried
? `${partnerName} is my ${partner}`
? `${partnerName} is my ${merriageStatusInfo}`
: `I am not married`
}
</p>
Expand Down

0 comments on commit b2c84e3

Please sign in to comment.