-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nabu-auth): template for user conflict error
- Loading branch information
Showing
5 changed files
with
107 additions
and
43 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
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
81 changes: 81 additions & 0 deletions
81
...es/blockchain-wallet-v4-frontend/src/modals/Onboarding/NabuUserConflictRedirect/index.tsx
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,81 @@ | ||
import React from 'react' | ||
import { FormattedMessage } from 'react-intl' | ||
import { connect, ConnectedProps } from 'react-redux' | ||
import { compose } from 'redux' | ||
import styled from 'styled-components' | ||
|
||
import { Icon, Modal, Text } from 'blockchain-info-components' | ||
import { actions } from 'data' | ||
import modalEnhancer from 'providers/ModalEnhancer' | ||
|
||
const Header = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 0 10px; | ||
margin: 30px 0 10px; | ||
overflow: hidden; | ||
text-align: center; | ||
` | ||
const Body = styled.div` | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 0 20px; | ||
box-sizing: border-box; | ||
text-align: center; | ||
margin: 4px 0 14px; | ||
& > :last-child { | ||
margin: 15px 0; | ||
} | ||
` | ||
|
||
class NabuUserConflictRedirect extends React.PureComponent<Props> { | ||
render() { | ||
return ( | ||
<Modal size='small'> | ||
<Header> | ||
<Icon | ||
name='alert-filled' | ||
size='48px' | ||
color='orange600' | ||
style={{ marginBottom: '16px' }} | ||
/> | ||
<Text size='20px' weight={500}> | ||
<FormattedMessage | ||
defaultMessage='Your Trading Account is linked to another wallet' | ||
id='modals.nabuuserconflict.title' | ||
/> | ||
</Text> | ||
</Header> | ||
<Body> | ||
<Text size='14px' weight={400}> | ||
<FormattedMessage | ||
defaultMessage='Your Blockchain.com trading account is associated with another wallet. Please log into your wallet starting with {placeholder} for account access.' | ||
id='modals.nabuuserconflict.body' | ||
/> | ||
</Text> | ||
</Body> | ||
</Modal> | ||
) | ||
} | ||
} | ||
|
||
const mapDispatchToProps = (dispatch) => ({ | ||
closeModal: () => dispatch(actions.modals.closeModal()) | ||
}) | ||
|
||
const connector = connect(null, mapDispatchToProps) | ||
|
||
type Props = ConnectedProps<typeof connector> | ||
|
||
const enhance = compose<any>( | ||
connect(null, mapDispatchToProps), | ||
modalEnhancer('NABU_USER_CONFLICT_REDIRECT'), | ||
connector | ||
) | ||
|
||
export default enhance(NabuUserConflictRedirect) |
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