-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
544 additions
and
527 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,4 @@ package-lock.json | |
.vs/ | ||
bin/ | ||
.idea/ | ||
*.iml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import { connect } from 'react-redux'; | ||
import { YOUR_CONTACT_CODE } from './constants'; | ||
import { checkAndDispatchStatusContactCode } from '../../actions/accounts'; | ||
import styled from "styled-components"; | ||
|
||
const DisplayLabel = styled.div` | ||
font-size: 14px; | ||
color: #939BA1; | ||
margin: 0 1em; | ||
`; | ||
|
||
const DisplayBox = styled.div` | ||
border: 1px solid #EEF2F5; | ||
border-radius: 8px; | ||
margin: 7px 12px 14px 12px; | ||
display: flex; | ||
flex-direction: column; | ||
justifyContent: space-around; | ||
min-height: 4em; | ||
word-wrap: break-word; | ||
`; | ||
|
||
const WrappedDisplayBox = ({displayType, pubKey, getStatusContactCode}) => ( | ||
<div> | ||
<DisplayLabel> | ||
{displayType} | ||
</DisplayLabel> | ||
<DisplayBox onClick={() => getStatusContactCode(displayType, pubKey)}> | ||
<div style={{margin: '16px'}}> | ||
<Typography type='body1'>{pubKey}</Typography> | ||
</div> | ||
</DisplayBox> | ||
</div> | ||
); | ||
|
||
const mapDispatchToDisplayBoxProps = dispatch => ({ | ||
getStatusContactCode(displayType, pubKey) { | ||
if (displayType === YOUR_CONTACT_CODE && !pubKey) checkAndDispatchStatusContactCode(dispatch); | ||
}, | ||
}); | ||
|
||
export default connect(null, mapDispatchToDisplayBoxProps)(WrappedDisplayBox); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export const YOUR_CONTACT_CODE = 'Your contact code'; | ||
export const YOUR_WALLET_ADDRESS = 'Your wallet address'; |
Oops, something went wrong.