From 1dc12e5cb2f0d59b4489e412fb15251b3fcff106 Mon Sep 17 00:00:00 2001 From: Abhishek P Anil Date: Wed, 21 Aug 2024 16:17:31 +0530 Subject: [PATCH] fix: set changed calendar id to cookie --- src/pages/Dashboard/Dashboard.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pages/Dashboard/Dashboard.jsx b/src/pages/Dashboard/Dashboard.jsx index 71463ae8..ccad3c1c 100644 --- a/src/pages/Dashboard/Dashboard.jsx +++ b/src/pages/Dashboard/Dashboard.jsx @@ -80,7 +80,9 @@ function Dashboard() { const accessTokenFromCookie = Cookies.get('accessToken'); const refreshTokenFromCookie = Cookies.get('refreshToken'); const calendarIdFromCookie = Cookies.get('calendarId'); + const calId = calendarId || calendarIdFromCookie; + if (calendarId) Cookies.set('calendarId', calId); if (!checkToken(accessToken, accessTokenFromCookie)) navigate(PathName.Login);