diff --git a/src/utils/getData.js b/src/utils/getData.js index e1d5e1a..aa14383 100644 --- a/src/utils/getData.js +++ b/src/utils/getData.js @@ -3,11 +3,9 @@ import basename from "../../react-config"; let cachedData = null; const getData = async () => { - if (cachedData) { - return cachedData; - } + const cacheBuster = new Date().getTime(); // Generate a unique timestamp try { - const response = await fetch(`${basename}data.json`); + const response = await fetch(`${basename}data.json?cacheBuster=${cacheBuster}`); if (!response.ok) { throw new Error('Network response was not ok'); }