Added android back funtionalites and web previes pages

This commit is contained in:
Srinath 2026-02-24 18:18:58 +05:30
parent 81e38fcc21
commit 247c9b3b98
1 changed files with 4 additions and 4 deletions

View File

@ -15,8 +15,8 @@ const IndividualBooking = lazy(() => import('./Pages/SelfBooking/IndividualBooki
const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL; const commonSubDir = import.meta.env.ENV_COMMON_BASE_URL;
const subDirectory = import.meta.env.ENV_BASE_URL; const subDirectory = import.meta.env.ENV_BASE_URL;
import '../ownLib/my-ui-lib.css'; import '../ownLib/my-ui-lib.css';
import CardSkeleton from './Components/Skeleton/CardSkeleton.jsx';
import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx'; import CustomerMenuPage from './Pages/Reports/MenuQRCode/CustomerMenuPage.jsx';
import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx'; import WeightScaleApp from './Pages/BookingScreen/WeightscaleApp.jsx';
import useSubscriptionManager from './useSubscriptionManager.js'; import useSubscriptionManager from './useSubscriptionManager.js';
@ -37,7 +37,7 @@ const LOGIN_PAGES = ['signin', 'login', 'auth'];
const AppRoutes = () => { const AppRoutes = () => {
const ItemCard = useSelector(GlobalItemCard); const ItemCard = useSelector(GlobalItemCard);
const { sessionData, logout } = useSessionManager(ItemCard); const { sessionData, logout } = useSessionManager(ItemCard);
const { remainingDays, handleCancel, freeExtend, extendModel, setExtendModel } = useSubscriptionManager(sessionData, logout); const { remainingDays, handleCancel, freeExtend, extendModel,handlePay, setExtendModel } = useSubscriptionManager(sessionData, logout);
const location = useLocation(); const location = useLocation();
const navigate = useNavigate(); const navigate = useNavigate();
@ -91,10 +91,11 @@ const AppRoutes = () => {
clearSession(); clearSession();
window.location.replace(`${commonSubDir}`); window.location.replace(`${commonSubDir}`);
} else { } else {
window.history.go(1); // block back on web window.history.go(1);
} }
}; };
// Add event listener on mount
window.addEventListener('popstate', handlePopState); window.addEventListener('popstate', handlePopState);
return () => window.removeEventListener('popstate', handlePopState); return () => window.removeEventListener('popstate', handlePopState);
}, [location.pathname]); }, [location.pathname]);
@ -186,7 +187,6 @@ const AppRoutes = () => {
/> />
); );
} }
return ( return (
<Suspense fallback={<CardSkeleton />}> <Suspense fallback={<CardSkeleton />}>
<Routes> <Routes>