JSFiddle - React, Tailwind, and code Playground

by Thiago Diniz

JavaScript

const xhr = window.XMLHttpRequest ? new XMLHttpRequest() : new ActiveXObject('Microsoft.XMLHTTP');
		xhr.open('GET', 'https://service.yourviews.com.br/api/v2/pub/dashboard/storereview', true);
		
		let value = '';
		
		xhr.onreadystatechange = function(data) {
			if(xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
				value = JSON.parse(xhr.responseText);
				document.getElementById('review-value').innerHTML = '<span class="block">+ <span class="gold">' + value.Element.Total + '</span></span>'
			}
		};
		xhr.setRequestHeader('YVStoreKey','97b11493-2d09-4f67-8152-baefaee4ce99');
		xhr.send();