mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-03-14 15:09:59 -04:00
Fix lint errors
This commit is contained in:
parent
343d968620
commit
3defee50cf
5 changed files with 16 additions and 15 deletions
|
@ -11,8 +11,8 @@ const EmailConfirmationBanner = ({onRequestDismiss, userUsesParentEmail}) => {
|
|||
const [showEmailConfirmationModal, setShowEmailConfirmationModal] = useState(false);
|
||||
const i18nPrefix =
|
||||
userUsesParentEmail ?
|
||||
"emailConfirmationBanner.parentEmail" :
|
||||
"emailConfirmationBanner";
|
||||
'emailConfirmationBanner.parentEmail' :
|
||||
'emailConfirmationBanner';
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
|
|
@ -104,7 +104,7 @@ class EmailStep extends React.Component {
|
|||
|
||||
const description = this.props.under13 ?
|
||||
this.props.intl.formatMessage({id: 'registration.under13.emailStepDescription'}) :
|
||||
undefined;
|
||||
null;
|
||||
|
||||
return (
|
||||
<Formik
|
||||
|
|
|
@ -234,8 +234,6 @@ class JoinFlow extends React.Component {
|
|||
// The dates are set to either `'null'` (before the BirthDateStep) or a string representation of a number.
|
||||
if (fieldValue && fieldValue !== 'null') {
|
||||
return Number(fieldValue);
|
||||
} else {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,14 +251,16 @@ class JoinFlow extends React.Component {
|
|||
|
||||
if (yearDiff > 13) {
|
||||
return false;
|
||||
} else if (yearDiff < 13) {
|
||||
return true;
|
||||
} else {
|
||||
const currentMonth1Based = now.getMonth() + 1;
|
||||
const monthsLeftToBirthday = birthMonth - currentMonth1Based;
|
||||
|
||||
return monthsLeftToBirthday >= 0;
|
||||
}
|
||||
|
||||
if (yearDiff < 13) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const currentMonth1Based = now.getMonth() + 1;
|
||||
const monthsLeftToBirthday = birthMonth - currentMonth1Based;
|
||||
|
||||
return monthsLeftToBirthday >= 0;
|
||||
}
|
||||
|
||||
render () {
|
||||
|
|
|
@ -77,8 +77,8 @@ class WelcomeStep extends React.Component {
|
|||
<FormattedMessage
|
||||
id={
|
||||
this.props.under13 ?
|
||||
"registration.under13.welcomeStepInstructions" :
|
||||
"registration.welcomeStepInstructions"
|
||||
'registration.under13.welcomeStepInstructions' :
|
||||
'registration.welcomeStepInstructions'
|
||||
}
|
||||
values={{
|
||||
email: this.props.email
|
||||
|
|
|
@ -240,7 +240,8 @@ Splash.propTypes = {
|
|||
has_outstanding_email_confirmation: PropTypes.bool,
|
||||
show_welcome: PropTypes.bool,
|
||||
confirm_email_banner: PropTypes.bool,
|
||||
unsupported_browser_banner: PropTypes.bool
|
||||
unsupported_browser_banner: PropTypes.bool,
|
||||
with_parent_email: PropTypes.bool
|
||||
}),
|
||||
getActivity: PropTypes.func.isRequired,
|
||||
getFeaturedGlobal: PropTypes.func.isRequired,
|
||||
|
|
Loading…
Reference in a new issue