Fix lint errors

This commit is contained in:
Georgi Angelov 2024-08-21 17:16:36 +03:00
parent 343d968620
commit 3defee50cf
5 changed files with 16 additions and 15 deletions

View file

@ -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>

View file

@ -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

View file

@ -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 () {

View file

@ -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

View file

@ -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,