fix: harden merge UI and improve error handling

- MergeAccounts: guard mutationFn against null token/userId
- MergeAccounts: call checkAdminStatus after successful merge
- MergeAccounts: add fallback when success but tokens null
- MergeAccounts: fix ErrorState showing "expired" for all errors
- MergeAccounts: fix formatCountdown dead ternary and hardcoded English
- MergeAccounts: add staleTime/refetchOnWindowFocus to preview query
- MergeAccounts: remove manual useCallback (React Compiler handles it)
- LinkOAuthCallback: add toast feedback on all error/success paths
- ConnectedAccounts: use invalidateQueries instead of refetch
- ConnectedAccounts: add error state rendering
- ConnectedAccounts/LinkOAuthCallback: share sessionStorage key constants
- i18n: add missing profile.accounts.linking key to zh and fa locales
This commit is contained in:
Fringg
2026-03-04 07:47:36 +03:00
parent 93f97d45be
commit 58cf1e3b50
5 changed files with 53 additions and 22 deletions

View File

@@ -3049,6 +3049,7 @@
"linkError": "اتصال حساب ناموفق بود",
"unlinkError": "قطع اتصال ناموفق بود",
"goToAccounts": "حساب‌های متصل",
"linking": "در حال اتصال حساب...",
"providers": {
"telegram": "تلگرام",
"email": "ایمیل",