diff --git a/src/config/lexics/userAccount.tsx b/src/config/lexics/userAccount.tsx new file mode 100644 index 00000000..16e9cbb3 --- /dev/null +++ b/src/config/lexics/userAccount.tsx @@ -0,0 +1,18 @@ +export const userAccountLexics = { + add_card: 8313, + change: 12614, + country: 835, + delete_card: 8692, + lastname: 858, + mail: 12912, + main: 13014, + month: 13019, + name: 645, + next_debit: 13018, + payment: 13015, + phone: 1656, + save_changes: 13017, + select_subscription: 12583, + subscriptions: 13016, + user_account: 12928, +} diff --git a/src/features/Common/Input/styled.tsx b/src/features/Common/Input/styled.tsx index f689f7d2..df9d34f8 100644 --- a/src/features/Common/Input/styled.tsx +++ b/src/features/Common/Input/styled.tsx @@ -38,6 +38,7 @@ type LabelProps = { export const Label = styled.label` font-style: normal; font-weight: normal; + white-space: nowrap; font-size: 16px; line-height: 24px; letter-spacing: -0.01em; diff --git a/src/features/Register/components/Price/index.tsx b/src/features/Register/components/Price/index.tsx index d5f23214..a86c4634 100644 --- a/src/features/Register/components/Price/index.tsx +++ b/src/features/Register/components/Price/index.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { useLexicsStore } from 'features/LexicsStore' import { PriceWrapper, @@ -15,10 +16,17 @@ type TPrice = { export const Price = ({ amount, currency = '₽', - perPeriod = 'мес', -}: TPrice) => ( - - {amount} - {currency} / {perPeriod} - -) + perPeriod = 'month', +}: TPrice) => { + const { translate } = useLexicsStore() + const perPeriodTranslated = translate(perPeriod) + + return ( + + {amount} + + {currency} / {perPeriodTranslated} + + + ) +} diff --git a/src/features/UserAccount/CardNumber/index.tsx b/src/features/UserAccount/CardNumber/index.tsx index 849d0023..228bd77f 100644 --- a/src/features/UserAccount/CardNumber/index.tsx +++ b/src/features/UserAccount/CardNumber/index.tsx @@ -1,6 +1,7 @@ import React from 'react' import { Radio } from 'features/Common/Radio' +import { T9n } from 'features/T9n' import { VisaLogoWrapper } from '../VisaLogo' import { CardNumberWrapper, CardNumberTextWrapper } from './styled' @@ -23,6 +24,8 @@ export const CardNumber = ({ onChange={() => {}} /> - Удалить карту + + + ) diff --git a/src/features/UserAccount/index.tsx b/src/features/UserAccount/index.tsx index 5a993901..190dbe0f 100644 --- a/src/features/UserAccount/index.tsx +++ b/src/features/UserAccount/index.tsx @@ -4,12 +4,17 @@ import { Background } from 'features/Background' import { Combobox } from 'features/Combobox' import { Input } from 'features/Common' import { Form } from 'features/Login/styled' +import { T9n } from 'features/T9n' +import { useLexicsStore, useLexicsConfig } from 'features/LexicsStore' + +import { userAccountLexics } from 'config/lexics/userAccount' import { CardNumber } from './CardNumber' import { UserAccountButton } from './UserAccountButton' import { PageTitle } from './PageTitle' import { UserAccountSubscription } from './UserAccountSubscription' import { TextNoBorder } from './TextNoBorder' + import { FormWrapper, OutlinedButton, @@ -21,203 +26,224 @@ import { const labelWidth = 78 -export const UserAccount = () => ( - - - - - - -
- Основное - - - - - - Сохранить изменения - -
- -
- Оплата - - - - - -
- -
- Подписки - - - - - - - -
-
-
-
- - - - - -
- Основное - - - - - - Сохранить изменения - -
- -
- Оплата - - - - - -
- -
- Подписки - - - - - - - - - -
-
-
-
-
-) +export const UserAccount = () => { + useLexicsConfig(userAccountLexics) + const { translate } = useLexicsStore() + + return ( + + + + + + +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + + + + + + + +
+
+
+
+ + + + + +
+ + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ +
+ + + + + + + + + + + + +
+
+
+
+
+ ) +}