Fix switch tooltip not showing the proper text on new plans page (#8608)

GitOrigin-RevId: efb49c7a6045b6a5b26a0b0d84a24d151f76f192
This commit is contained in:
M Fahru 2022-06-28 09:36:35 -04:00 committed by Copybot
parent d00d40464f
commit ac1f72263c

View file

@ -24,6 +24,11 @@ export function switchMonthlyAnnual(currentMonthlyAnnualSwitchValue) {
currentMonthlyAnnualSwitchValue === 'annual'
)
document.querySelectorAll('[data-ol-tooltip-period]').forEach(el => {
const period = el.getAttribute('data-ol-tooltip-period')
el.hidden = period !== currentMonthlyAnnualSwitchValue
})
document
.querySelectorAll('[data-ol-plans-v2-table-annual-price-before-discount]')
.forEach(el => {