diff --git a/src/components/Breadcrumb/index.js b/src/components/Breadcrumb/index.js index 216fe4a2..4a9ebd14 100644 --- a/src/components/Breadcrumb/index.js +++ b/src/components/Breadcrumb/index.js @@ -1,6 +1,6 @@ // @flow -import React, { Fragment } from 'react' +import React, { PureComponent, Fragment } from 'react' import styled from 'styled-components' import Box from 'components/base/Box' @@ -71,26 +71,31 @@ type Props = { currentStep: number | string, } -const Breadcrumb = ({ items, currentStep }: Props) => ( - - {items.map((item, i) => { - const active = i < parseInt(currentStep, 10) - const start = i === 0 - return ( - - {!start && } - - - {i + 1} - - {item.label} - - - ) - })} - -) +class Breadcrumb extends PureComponent { + render() { + const { items, currentStep } = this.props + return ( + + {items.map((item, i) => { + const active = i < parseInt(currentStep, 10) + const start = i === 0 + return ( + + {!start && } + + + {i + 1} + + {item.label} + + + ) + })} + + ) + } +} export default Breadcrumb diff --git a/src/components/modals/Send.js b/src/components/modals/Send.js index f1aeeece..d28ed4e3 100644 --- a/src/components/modals/Send.js +++ b/src/components/modals/Send.js @@ -99,6 +99,16 @@ class Send extends PureComponent { ...defaultState, } + componentWillMount() { + const { t } = this.props + this._items = [ + { label: t('sendModal.Amount') }, + { label: t('sendModal.Summary') }, + { label: t('sendModal.SecureValidation') }, + { label: t('sendModal.Confirmation') }, + ] + } + getStepProps(data: any) { const { inputValue, step } = this.state const { t } = this.props @@ -127,6 +137,8 @@ class Send extends PureComponent { } } + _items = [] + handleChangeInput = (key: $Keys) => (value: $Values) => this.setState(prev => ({ inputValue: { @@ -158,15 +170,7 @@ class Send extends PureComponent { return ( - + diff --git a/static/i18n/en/translation.yml b/static/i18n/en/translation.yml index 2164fcfb..e617b63a 100644 --- a/static/i18n/en/translation.yml +++ b/static/i18n/en/translation.yml @@ -66,3 +66,9 @@ update: IsUnlocked: password: Password + +sendModal: + Amount: Amount + Summary: Summary + SecureValidation: Secure validation + Confirmation: Confirmation diff --git a/static/i18n/fr/translation.yml b/static/i18n/fr/translation.yml index 1560792c..1631238c 100644 --- a/static/i18n/fr/translation.yml +++ b/static/i18n/fr/translation.yml @@ -66,3 +66,9 @@ update: IsUnlocked: password: Mot de passe + +sendModal: + Amount: Montant + Summary: Résumé + SecureValidation: Validation sécurisée + Confirmation: Confirmation