fix(js): hide conversion buttons if JavaScript enabled

Removed event listeners on conversion buttons and instead
hide them when JavaScript is enabled. This aims to improve
the user experience by preventing redundant UI interactions
that are handled dynamically.
This commit is contained in:
Kumi 2024-08-10 16:34:42 +02:00
parent e97805d379
commit 77c41c08c2
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -64,16 +64,9 @@ document.addEventListener('DOMContentLoaded', function () {
}
});
// Add event listeners for the conversion buttons
convertXMRToFiatBtn.addEventListener('click', (e) => {
e.preventDefault();
xmrConvert();
});
convertFiatToXMRBtn.addEventListener('click', (e) => {
e.preventDefault();
fiatConvert();
});
// Hide the conversion buttons if JavaScript is enabled
convertXMRToFiatBtn.style.display = 'none';
convertFiatToXMRBtn.style.display = 'none';
// Fetch updated exchange rates immediately, then every 5 seconds
fetchUpdatedExchangeRates();