From caa77134031fc07ae970c2db1c1bf82c92c69f6b Mon Sep 17 00:00:00 2001 From: Tamilselvan Date: Wed, 11 Feb 2026 18:10:44 +0530 Subject: [PATCH] missed Function --- src/useSubscriptionManager.js | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/useSubscriptionManager.js b/src/useSubscriptionManager.js index baea704..e841172 100644 --- a/src/useSubscriptionManager.js +++ b/src/useSubscriptionManager.js @@ -53,7 +53,7 @@ const useSubscriptionManager = (sessionData, logout) => { try { const UserId = getSession('UserId'); - const AppId = getSession('UserId') + const AppId = getSession('AppId') // Current date const now = new Date(); const currentDate = formatDate(now); @@ -138,9 +138,23 @@ const useSubscriptionManager = (sessionData, logout) => { expData.RemainingSeconds < 1 && UserType !== 'Super Admin' ) { - alert('Subscription expired'); - logout(); + + if ( + (UserType !== 'Super Admin' || + UserType !== 'Super Admin User') && (expData?.PlanType?.toLowerCase() == "extend expired") + ) { + console.log('Subscription expired, logging out...'); + alert('Subscription expired'); + logout(); + } + else if ( + (UserType !== 'Super Admin' || + UserType !== 'Super Admin User') && (expData?.PlanType?.toLowerCase() == "plan expired") + ) { + setExtendModel(true) + } } + } };