fix: harden gift subscription frontend after multi-agent review

- Handle expired status in GiftResult (stop polling + show FailedState)
- Add PollErrorState for balance mode poll errors (softer UX)
- Remove non-null assertions in handleSubmit (explicit narrowing)
- Wrap gift routes in ErrorBoundary
- Add pollErrorTitle/pollErrorDesc i18n keys to all 4 locales
This commit is contained in:
Fringg
2026-03-09 20:34:41 +03:00
parent 7890d480e0
commit 6ea1de2e8a
10 changed files with 299 additions and 52 deletions

View File

@@ -4152,13 +4152,26 @@
"tryAgain": "Try again",
"pollTimeout": "Processing is taking longer than usual",
"pollTimeoutDesc": "Try checking the status later",
"pollErrorTitle": "Could not check gift status",
"pollErrorDesc": "Your purchase was successful. Check your dashboard for details.",
"retry": "Check again",
"notFound": "Gift configuration not found",
"noToken": "Invalid link",
"noTokenDesc": "This gift link is invalid or has expired.",
"days": "days",
"tariff": "Tariff",
"period": "Period",
"giftMessageLabel": "Message",
"recipientLabel": "Recipient",
"featureDisabled": "Gift feature is temporarily unavailable",
"redirecting": "Redirecting..."
"redirecting": "Redirecting...",
"pending": {
"title": "You received a gift!",
"from": "from {{sender}}",
"activate": "Activate"
},
"warning": {
"telegram_unresolvable": "Could not verify this Telegram username. The recipient may not receive a notification about the gift."
}
}
}