import React, { Component, ErrorInfo, ReactNode, StrictMode } from 'react'; import { createRoot } from 'react-dom/client'; import App from './App.tsx'; import './index.css'; interface ErrorBoundaryProps { children: ReactNode; } interface ErrorBoundaryState { hasError: boolean; error: Error | null; } class AppErrorBoundary extends Component { constructor(props: ErrorBoundaryProps) { super(props); this.state = { hasError: false, error: null }; } static getDerivedStateFromError(error: Error): ErrorBoundaryState { return { hasError: true, error }; } componentDidCatch(error: Error, errorInfo: ErrorInfo) { console.error('App runtime error caught by boundary:', error, errorInfo); } handleReload = () => { try { window.location.reload(); } catch (_) {} }; handleResetHome = () => { try { sessionStorage.removeItem('thesabil_admin_target_tab'); window.location.href = '/'; } catch (_) { window.location.reload(); } }; render() { if (this.state.hasError) { return (
SV

The Sabil Voyages

Experiencing a slight connection adjustment. Please refresh to resume your luxury Kashmir expedition.

); } return this.props.children; } } createRoot(document.getElementById('root')!).render( , );