export const loadPlanWithRetry = async (handle: string, retries = 3) => { for (let i = 0; i < retries; i++) { try { const plan = await loadPlan(handle); if (plan) return plan; } catch (err) { console.warn(`[Plan Load] Attempt ${i + 1} failed for ${handle}`); if (i === retries - 1) throw err; await new Promise(resolve => setTimeout(resolve, 1000 * (i + 1))); } } }; const loadPlan = async (handle: string) => { // Implement your plan loading logic here // This is a placeholder - replace with actual implementation const response = await fetch(`/api/plans/${handle}`); return response.json(); };