From 592fe0b5aacd8a402d4c3ab36cb89b943f15b5f3 Mon Sep 17 00:00:00 2001 From: gkatrakazas Date: Fri, 5 Jul 2024 18:21:33 +0300 Subject: [PATCH] Handle case of display spinner forever when get token and then clean cookies --- src/components/PrivateRoute.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/PrivateRoute.js b/src/components/PrivateRoute.js index c71922bdf..35a2a57c6 100644 --- a/src/components/PrivateRoute.js +++ b/src/components/PrivateRoute.js @@ -59,6 +59,7 @@ const PrivateRoute = ({ children }) => { console.log('FCM Token success:', fcmToken); } else { console.log('FCM Token failed to get fcmtoken in private route', fcmToken); + setTokenSentInSession(false) } } catch (error) { console.error('Error sending FCM token to the backend:', error);