Commit 69183ed8 authored by Moody Salem's avatar Moody Salem

fix: translate claim modal inputs

parent 05e741b6
import { useContext, useCallback } from 'react' import { t, Trans } from '@lingui/macro'
import { useContext, useCallback, ReactNode } from 'react'
import styled, { ThemeContext } from 'styled-components' import styled, { ThemeContext } from 'styled-components'
import useENS from '../../hooks/useENS' import useENS from '../../hooks/useENS'
import { useActiveWeb3React } from '../../hooks/web3' import { useActiveWeb3React } from '../../hooks/web3'
...@@ -68,14 +69,14 @@ const Input = styled.input<{ error?: boolean }>` ...@@ -68,14 +69,14 @@ const Input = styled.input<{ error?: boolean }>`
export default function AddressInputPanel({ export default function AddressInputPanel({
id, id,
className = 'recipient-address-input', className = 'recipient-address-input',
label = 'Recipient', label,
placeholder, placeholder,
value, value,
onChange, onChange,
}: { }: {
id?: string id?: string
className?: string className?: string
label?: string label?: ReactNode
placeholder?: string placeholder?: string
// the typed string value // the typed string value
value: string value: string
...@@ -105,14 +106,14 @@ export default function AddressInputPanel({ ...@@ -105,14 +106,14 @@ export default function AddressInputPanel({
<AutoColumn gap="md"> <AutoColumn gap="md">
<RowBetween> <RowBetween>
<TYPE.black color={theme.text2} fontWeight={500} fontSize={14}> <TYPE.black color={theme.text2} fontWeight={500} fontSize={14}>
{label} {label ?? <Trans>Recipient</Trans>}
</TYPE.black> </TYPE.black>
{address && chainId && ( {address && chainId && (
<ExternalLink <ExternalLink
href={getExplorerLink(chainId, name ?? address, ExplorerDataType.ADDRESS)} href={getExplorerLink(chainId, name ?? address, ExplorerDataType.ADDRESS)}
style={{ fontSize: '14px' }} style={{ fontSize: '14px' }}
> >
(View on Explorer) <Trans>(View on Explorer)</Trans>
</ExternalLink> </ExternalLink>
)} )}
</RowBetween> </RowBetween>
...@@ -123,7 +124,7 @@ export default function AddressInputPanel({ ...@@ -123,7 +124,7 @@ export default function AddressInputPanel({
autoCorrect="off" autoCorrect="off"
autoCapitalize="off" autoCapitalize="off"
spellCheck="false" spellCheck="false"
placeholder={placeholder ?? 'Wallet Address or ENS name'} placeholder={placeholder ?? t`Wallet Address or ENS name`}
error={error} error={error}
pattern="^(0x[a-fA-F0-9]{40})$" pattern="^(0x[a-fA-F0-9]{40})$"
onChange={handleInput} onChange={handleInput}
......
...@@ -4,6 +4,7 @@ import CurrencyInputPanel from 'components/CurrencyInputPanel' ...@@ -4,6 +4,7 @@ import CurrencyInputPanel from 'components/CurrencyInputPanel'
import styled from 'styled-components' import styled from 'styled-components'
import { ProposalAction } from './ProposalActionSelector' import { ProposalAction } from './ProposalActionSelector'
import { Currency } from '@uniswap/sdk-core' import { Currency } from '@uniswap/sdk-core'
import { Trans } from '@lingui/macro'
enum ProposalActionDetailField { enum ProposalActionDetailField {
ADDRESS, ADDRESS,
...@@ -40,7 +41,7 @@ export const ProposalActionDetail = ({ ...@@ -40,7 +41,7 @@ export const ProposalActionDetail = ({
[ProposalAction.TRANSFER_TOKEN]: [ [ProposalAction.TRANSFER_TOKEN]: [
{ {
type: ProposalActionDetailField.ADDRESS, type: ProposalActionDetailField.ADDRESS,
label: 'To', label: <Trans>To</Trans>,
}, },
{ {
type: ProposalActionDetailField.CURRENCY, type: ProposalActionDetailField.CURRENCY,
...@@ -49,7 +50,7 @@ export const ProposalActionDetail = ({ ...@@ -49,7 +50,7 @@ export const ProposalActionDetail = ({
[ProposalAction.APPROVE_TOKEN]: [ [ProposalAction.APPROVE_TOKEN]: [
{ {
type: ProposalActionDetailField.ADDRESS, type: ProposalActionDetailField.ADDRESS,
label: 'To', label: <Trans>To</Trans>,
}, },
{ {
type: ProposalActionDetailField.CURRENCY, type: ProposalActionDetailField.CURRENCY,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment