diff --git a/src/components/ProfilePage.jsx b/src/components/ProfilePage.jsx index 0ed1ebb..c71a800 100644 --- a/src/components/ProfilePage.jsx +++ b/src/components/ProfilePage.jsx @@ -92,6 +92,8 @@ export class ProfilePage extends React.Component { visibilityCourseCertificates, bio, visibilityBio, + requiresParentalConsent, + isCurrentUserProfile, } = this.props; const commonFormProps = { @@ -101,6 +103,8 @@ export class ProfilePage extends React.Component { changeHandler: this.handleChange, }; + const shouldShowAgeMessage = requiresParentalConsent && isCurrentUserProfile; + return (
@@ -165,7 +169,7 @@ export class ProfilePage extends React.Component { lg={{ size: 8, offset: 1 }} className="mt-4 mt-md-n5" > - {this.props.requiresParentalConsent ? : null} + {shouldShowAgeMessage ? : null} + - + ); }