diff --git a/package.json b/package.json index dfb9424..4080cb7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "no-copy-frontend", - "version": "0.68.0", + "version": "0.69.0", "private": true, "scripts": { "dev": "next dev -p 2999", diff --git a/src/app/ui/referral-page/payout-settings/bank-card.tsx b/src/app/ui/referral-page/payout-settings/bank-card.tsx index a844c37..38d3cf9 100644 --- a/src/app/ui/referral-page/payout-settings/bank-card.tsx +++ b/src/app/ui/referral-page/payout-settings/bank-card.tsx @@ -10,7 +10,7 @@ import { bankCardFormSchema } from '@/app/actions/definitions'; import { useTranslations } from 'next-intl'; interface cardInfoType { - cardType: string, + cardType: string | null, potentiallyValid: boolean, cardValid?: boolean } @@ -110,15 +110,23 @@ export default function BankCard() { } if (e.target.value.length === 19 && !numberValidation.isValid) { - setCardInfo((prev) => { - if (prev) { - return { - ...prev, - cardValid: false + if (cardInfo) { + setCardInfo((prev) => { + if (prev) { + return { + ...prev, + cardValid: false + } } - } - return null; - }) + return null; + }); + } else { + setCardInfo({ + cardType: null, + potentiallyValid: false, + cardValid: false + }) + } } if (validatedField.success) { @@ -162,7 +170,7 @@ export default function BankCard() { disabled={!isEditing} isValid={cardInfo?.cardValid} /> - {/* */} + {cardInfo && (
+ {/* */} {t('bank-card-not-valid')} @@ -248,7 +257,7 @@ export default function BankCard() { setIsEditing(true) }} > - Изменить + {t('change')} ) } diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 3e46b28..51c3816 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -366,7 +366,8 @@ "search-title-description": "Upload a file to search for similar protected content in your library and on the web", "how-does-search-work": "How does search work?", "search-info-description-text": "Our system analyzes the uploaded file and compares it with your protected files, using computer vision and digital fingerprinting algorithms.", - "documents-few": "Documents" + "documents-few": "Documents", + "change": "Change" }, "Login-register-form": { "and": "and", diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 366966c..020dc36 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -366,7 +366,8 @@ "search-title-description": "Загрузите файл для поиска похожего защищенного контента в вашей библиотеке и в интернете", "how-does-search-work": "Как работает поиск?", "search-info-description-text": "Наша система анализирует загруженный файл и сравнивает его с вашими защищенными файлами, используя алгоритмы компьютерного зрения и цифровых отпечатков.", - "documents-few": "Документов" + "documents-few": "Документов", + "change": "Изменить" }, "Login-register-form": { "and": "и",