JSFiddle - React, Tailwind, and code Playground
HTML
<img id="sign" src="">
JavaScript
var dateAPI = 'https://script.google.com/macros/s/AKfycbyd5AcbAnWi2Yn0xhFRbyzS4qMq1VucMVgVvhul5XqS9HkAyJY/exec?tz=America/New_York';
$.getJSON(dateAPI).then(function (dateInfo) {
var OPENAT = 14; // 2pm (12 + 2)
var CLOSEAT = 15; // 3pm (12 + 3)
var currentHour = dateInfo.hours; // from API
if (currentHour >= OPENAT && currentHour <= CLOSEAT) {
sign.src = "x.jpg";
} else {
sign.src = "y.jpg";
}
});