blob: c454fc52659b66ded6adf8b8f942d4eb4c3aa5d2 [file] [log] [blame]
// This is used by the components in this folder to load
// JSON public data from various places
const fetchJSON = async url => {
var result = {};
const response = await fetch(url);
if (response.status == 200) {
const data = await response.text();
result = JSON.parse(data);
}
return result;
}
export default fetchJSON;