mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
feat: show localized error for self-activation attempt
This commit is contained in:
@@ -869,7 +869,11 @@ function ActivateTabContent({ initialCode }: { initialCode?: string | null }) {
|
||||
queryClient.invalidateQueries({ queryKey: ['balance'] });
|
||||
},
|
||||
onError: (err) => {
|
||||
const msg = getApiErrorMessage(err, t('gift.activateError'));
|
||||
const raw = getApiErrorMessage(err, '');
|
||||
const msg =
|
||||
raw === 'Cannot activate your own gift'
|
||||
? t('gift.activateSelfError')
|
||||
: raw || t('gift.activateError');
|
||||
setActivateError(msg);
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user