From fa8de53a12fcb76580a02a0496703b110178c638 Mon Sep 17 00:00:00 2001 From: Eli Date: Fri, 7 May 2021 21:33:48 +0200 Subject: [PATCH] Added local storage to avoid all the api-requests getting called on every refresh of the page. Which again could lead to throttling --- samples/react-calendar/package-lock.json | 2 +- .../src/webparts/calendar/components/Calendar.tsx | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/samples/react-calendar/package-lock.json b/samples/react-calendar/package-lock.json index e6ee108fd..72f9f73a5 100644 --- a/samples/react-calendar/package-lock.json +++ b/samples/react-calendar/package-lock.json @@ -1,6 +1,6 @@ { "name": "react-calendar", - "version": "1.0.4", + "version": "1.0.10", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/samples/react-calendar/src/webparts/calendar/components/Calendar.tsx b/samples/react-calendar/src/webparts/calendar/components/Calendar.tsx index 03d86829d..52151075a 100644 --- a/samples/react-calendar/src/webparts/calendar/components/Calendar.tsx +++ b/samples/react-calendar/src/webparts/calendar/components/Calendar.tsx @@ -122,8 +122,17 @@ export default class Calendar extends React.Component