From 19904b64d96d8427fc526e814d9f80ae60878824 Mon Sep 17 00:00:00 2001 From: Ankit Kumar Date: Fri, 18 Mar 2022 01:15:29 +0530 Subject: [PATCH] updated cache invalidation --- script.sh | 0 src/App.js | 6 ++++++ 2 files changed, 6 insertions(+) create mode 100644 script.sh diff --git a/script.sh b/script.sh new file mode 100644 index 00000000..e69de29b diff --git a/src/App.js b/src/App.js index 6c69df45..04075820 100644 --- a/src/App.js +++ b/src/App.js @@ -17,6 +17,12 @@ const App = () => { const location = useLocation(); // changing header + const CURRENT_VERSION = "v0.1.3" + console.log(CURRENT_VERSION) + if (localStorage.getItem("VERSION")< CURRENT_VERSION || localStorage.getItem("VERSION") == null){ + localStorage.clear(); + localStorage.setItem("VERSION", CURRENT_VERSION); + } // scrolling to top on every page change useEffect(() => {