<div class="registration-error-junior-page registration_skip registration_hide">
<div class="registration-error-junior-page__title">
<div class="registration-form-title">
Sorry, you must be a parent ot legal guardian in order to add a youth to your profile
</div>
</div>
<div class="registration-error-junior-page__back">
<a href="/" class="cta cta--r-primary ">
<p>ADD ANOTHER JUNIOR</p>
</a>
</div>
</div>
No notes defined.
{
"title": {
"copy": "Sorry, you must be a parent ot legal guardian in order to add a youth to your profile"
},
"btn-1": {
"copy": "ADD ANOTHER JUNIOR"
}
}
/* eslint-disable compat/compat */
import { hideClass } from '../../registration-error/registration-error';
import {
currentPage,
onComponentVisible,
hideStep,
hideBackBtn,
} from '../../registrationUtility';
export default (currentElement, addingJunior) => {
const nextBtnHandler = event => {
event.preventDefault();
currentElement.classList.add(hideClass);
addingJunior.classList.remove(hideClass);
currentElement.classList.add('registration_skip');
};
const controller = new AbortController();
onComponentVisible(currentElement, () => {
hideStep();
hideBackBtn();
currentPage.page = currentElement;
const nextBtn = currentElement.querySelector(
'.registration-error-junior-page__back'
);
nextBtn.addEventListener('click', nextBtnHandler, {
signal: controller.signal,
});
});
};
.registration-error-junior-page {
$cta-container-mt: 40px;
$cta-gap: 24px;
$body-mt: 32px;
&__back {
margin-top: $cta-gap;
}
.cta--r-primary {
min-height: 44px;
font-size: 16px;
}
}
<div class="registration-error-junior-page registration_skip registration_hide">
<div class="registration-error-junior-page__title">
{{render '@registration-form-title' title}}
</div>
<div class="registration-error-junior-page__back">
{{render '@cta--r-primary' btn-1 merge="true"}}
</div>
</div>