import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App'; import './index.css'; class ErrorBoundary extends React.Component { constructor(props) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error) { return { hasError: true, error }; } componentDidCatch(error, errorInfo) { console.error('App Uncaught Error:', error, errorInfo); } handleReload = () => { try { if ('caches' in window) { caches.keys().then((names) => { for (const name of names) caches.delete(name); }); } localStorage.removeItem('jmart_cart'); } catch (e) { console.warn('Cache clear error:', e); } window.location.reload(); }; render() { if (this.state.hasError) { return (
దయచేసి కింద ఉన్న బటన్ను నొక్కి యాప్ను రీలోడ్ చేయండి.