Skip to content

Commit

Permalink
Typo fixing and remove text from contact section
Browse files Browse the repository at this point in the history
  • Loading branch information
barbara-chaves committed Nov 2, 2023
1 parent 7a1143c commit 96fbb94
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
45 changes: 27 additions & 18 deletions app/javascript/components/tpi/AscorQuestionLegend.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,33 @@ const AscorQuestionLegend = () => {
const isChecked = () => {
let anyChecked = false;

document.querySelectorAll('.country-assessment > .country-assessment__pillar').forEach((section) => {
let areaChecked = false;
document
.querySelectorAll('.country-assessment > .country-assessment__pillar')
.forEach((section) => {
let areaChecked = false;

section.querySelectorAll('input.toggle').forEach((input) => {
areaChecked = areaChecked || input.checked;
anyChecked = anyChecked || input.checked;
section.querySelectorAll('input.toggle').forEach((input) => {
areaChecked = areaChecked || input.checked;
anyChecked = anyChecked || input.checked;
});
return areaChecked
? section.classList.add('active')
: section.classList.remove('active');
});
return areaChecked ? section.classList.add('active') : section.classList.remove('active');
});

setVisible(anyChecked);
};

useEffect(() => {
const eventListeners = [];
document.querySelectorAll('.country-assessment > .country-assessment__pillar > input.toggle').forEach((input) => {
const listener = input.addEventListener('click', isChecked);
eventListeners.push([input, listener]);
});
document
.querySelectorAll(
'.country-assessment > .country-assessment__pillar > input.toggle'
)
.forEach((input) => {
const listener = input.addEventListener('click', isChecked);
eventListeners.push([input, listener]);
});

return () => {
eventListeners.forEach(([input, listener]) => {
Expand All @@ -35,10 +43,12 @@ const AscorQuestionLegend = () => {
});

return (
<div className={cx('country-question-legend', { 'country-question-legend--active': isVisible })}>
<div className="banking-question-legend__header">
Legend
</div>
<div
className={cx('country-question-legend', {
'country-question-legend--active': isVisible
})}
>
<div className="banking-question-legend__header">Legend</div>
<div className="country-question-legend__content">
<div className="country-question-legend-answer country-question-legend-answer--no">
No
Expand All @@ -59,14 +69,13 @@ const AscorQuestionLegend = () => {
No disclosure
</div>
<div className="country-question-legend-answer country-question-legend-answer--excempt">
Excempt
Exempt
</div>
</div>
</div>
);
};

AscorQuestionLegend.propTypes = {
};
AscorQuestionLegend.propTypes = {};

export default AscorQuestionLegend;
1 change: 0 additions & 1 deletion app/views/tpi/ascor/_contact.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<div class="contacts__icon"></div>
<div class="contacts__info">
<h3>Get in touch with us for enquiries. </h3>
<p>At ASCOR, we are here to help and answer any questions you may have. Contact us at <span class="contacts__info__link">[email protected]</span>.</p>
<a href="mailto:[email protected]" class="button">Contact ASCOR</a>
</div>
</div>

0 comments on commit 96fbb94

Please sign in to comment.