-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(Tiers): Move messages to component services file
- Loading branch information
plondon
committed
Dec 13, 2018
1 parent
1b8a7e0
commit e862e4c
Showing
3 changed files
with
146 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
129 changes: 129 additions & 0 deletions
129
...es/blockchain-wallet-v4-frontend/src/components/IdentityVerification/TierCard/services.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
import React from 'react' | ||
import { FormattedMessage } from 'react-intl' | ||
import { Text } from 'blockchain-info-components' | ||
|
||
export const messages = { | ||
EMAIL: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.email' | ||
defaultMessage='Verified Email' | ||
/> | ||
</Text> | ||
), | ||
NAME: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.name' | ||
defaultMessage='Name' | ||
/> | ||
</Text> | ||
), | ||
DOB: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.dob' | ||
defaultMessage='Date of Birth' | ||
/> | ||
</Text> | ||
), | ||
ADDRESS: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.address' | ||
defaultMessage='Address' | ||
/> | ||
</Text> | ||
), | ||
TIER1: ( | ||
<Text size='14px' color='gray-3'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.tier1' | ||
defaultMessage='Tier 1+' | ||
/> | ||
</Text> | ||
), | ||
MOBILE: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.phone' | ||
defaultMessage='Verified Phone' | ||
/> | ||
</Text> | ||
), | ||
GOVID: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.id' | ||
defaultMessage="Gov't Issued ID" | ||
/> | ||
</Text> | ||
), | ||
SELFIE: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.selfie' | ||
defaultMessage='Selfie' | ||
/> | ||
</Text> | ||
) | ||
} | ||
|
||
export const limits = { | ||
ANNUAL: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.annuallimit' | ||
defaultMessage='Annual Swap Limit' | ||
/> | ||
</Text> | ||
), | ||
DAILY: ( | ||
<Text size='14px'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.dailylimit' | ||
defaultMessage='Daily Swap Limit' | ||
/> | ||
</Text> | ||
) | ||
} | ||
|
||
export const status = (state, time) => { | ||
switch (state) { | ||
case 'verified': | ||
return ( | ||
<Text size='14px' color='success'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.verified' | ||
defaultMessage='Approved!' | ||
/> | ||
</Text> | ||
) | ||
case 'pending': | ||
return ( | ||
<Text size='14px' color='btc'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.pending' | ||
defaultMessage='In Review' | ||
/> | ||
</Text> | ||
) | ||
case 'rejected': | ||
return ( | ||
<Text size='14px' color='error'> | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.rejected' | ||
defaultMessage='Rejected' | ||
/> | ||
</Text> | ||
) | ||
default: | ||
return ( | ||
<FormattedMessage | ||
id='components.identityverification.tiercard.timing' | ||
defaultMessage='Takes {time} min' | ||
values={{ time }} | ||
/> | ||
) | ||
} | ||
} |