Profile shows referral link

This commit is contained in:
Reckless_Satoshi
2022-03-05 03:48:11 -08:00
parent c385be123f
commit e775c02011
3 changed files with 38 additions and 5 deletions

View File

@ -22,6 +22,7 @@ import ContentCopy from "@mui/icons-material/ContentCopy";
import DnsIcon from '@mui/icons-material/Dns'; import DnsIcon from '@mui/icons-material/Dns';
import WebIcon from '@mui/icons-material/Web'; import WebIcon from '@mui/icons-material/Web';
import BookIcon from '@mui/icons-material/Book'; import BookIcon from '@mui/icons-material/Book';
import PersonAddAltIcon from '@mui/icons-material/PersonAddAlt';
// pretty numbers // pretty numbers
function pn(x) { function pn(x) {
@ -247,6 +248,7 @@ export default class BottomBar extends Component {
/> />
</ListItemAvatar> </ListItemAvatar>
</ListItem> </ListItem>
<Divider/> <Divider/>
{this.state.active_order_id ? {this.state.active_order_id ?
// TODO Link to router and do this.props.history.push // TODO Link to router and do this.props.history.push
@ -264,6 +266,7 @@ export default class BottomBar extends Component {
<ListItemText primary="No active orders" secondary="Your current order"/> <ListItemText primary="No active orders" secondary="Your current order"/>
</ListItem> </ListItem>
} }
<ListItem> <ListItem>
<ListItemIcon> <ListItemIcon>
<PasswordIcon/> <PasswordIcon/>
@ -278,14 +281,40 @@ export default class BottomBar extends Component {
size='small' size='small'
InputProps={{ InputProps={{
endAdornment: endAdornment:
<IconButton onClick= {()=>navigator.clipboard.writeText(this.props.token)}> <Tooltip disableHoverListener open={this.state.copied} enterTouchDelay="0" title="Copied!">
<ContentCopy /> <IconButton onClick= {()=>navigator.clipboard.writeText(this.props.token)}>
</IconButton>, <ContentCopy />
</IconButton>
</Tooltip>,
}} }}
/> />
: :
'Cannot remember'} 'Cannot remember'}
</ListItemText> </ListItemText>
</ListItem>
<Divider/>
<ListItem>
<ListItemIcon>
<PersonAddAltIcon/>
</ListItemIcon>
<ListItemText secondary="Your referral link">
<TextField
label='Share to earn satoshis'
// value={this.props.referral_link}
value={'LINKKKKKKK732hcd23j98j2iuwh78c2i3jd9cy2hiudn8723ihdcniu2hdci23923jiuxjw'}
// variant='filled'
size='small'
InputProps={{
endAdornment:
<Tooltip disableHoverListener open={this.state.copied} enterTouchDelay="0" title="Copied!">
<IconButton onClick= {()=>navigator.clipboard.writeText('LINKKKKKKK732hcd23j98j2iuwh78c2i3jd9cy2hiudn8723ihdcniu2hdci23923jiuxjw')}>
<ContentCopy />
</IconButton>
</Tooltip>,
}}
/>
</ListItemText>
</ListItem> </ListItem>
</List> </List>

File diff suppressed because one or more lines are too long

View File

@ -838,6 +838,10 @@
!*** ./node_modules/@mui/base/utils/appendOwnerState.js ***! !*** ./node_modules/@mui/base/utils/appendOwnerState.js ***!
\**********************************************************/ \**********************************************************/
/*!**********************************************************!*\
!*** ./node_modules/@mui/icons-material/PersonAddAlt.js ***!
\**********************************************************/
/*!**********************************************************!*\ /*!**********************************************************!*\
!*** ./node_modules/@mui/material/Alert/alertClasses.js ***! !*** ./node_modules/@mui/material/Alert/alertClasses.js ***!
\**********************************************************/ \**********************************************************/