Commit d8c21f5f authored by Thibaut Sardan's avatar Thibaut Sardan Committed by Alexey
Browse files

Show qr code right away (#188)

* fix(ux): show qr code right away

* fix(package.json): remove commit-wizard

* fix(package.json): remove simple-commit-message

* fix(package-lock.json): remove it
parent d3841b94
......@@ -61,15 +61,8 @@ export default class AccountDetails extends React.Component {
class AccountDetailsView extends React.Component {
constructor(props) {
super(props);
this.state = {
showQr: false
};
}
state: {
showQr: false
};
componentDidMount() {
this.subscription = this.props.navigation.addListener('willFocus', t => {
this.props.txStore.loadTxsForAccount(this.props.accounts.getSelected());
......@@ -85,20 +78,7 @@ class AccountDetailsView extends React.Component {
if (!account) {
return null;
}
const qr = this.state.showQr ? (
<View style={styles.qr}>
<QrView text={accountId(account)} />
</View>
) : (
<Button
textStyles={{ color: colors.card_bg_text }}
buttonStyles={styles.qrButton}
title="Show Account QR Code"
onPress={() => {
this.setState({ showQr: true });
}}
/>
);
return (
<ScrollView
contentContainerStyle={styles.bodyContent}
......@@ -111,7 +91,9 @@ class AccountDetailsView extends React.Component {
title={account.name}
onPress={() => this.props.navigation.navigate('AccountEdit')}
/>
{qr}
<View style={styles.qr}>
<QrView text={accountId(account)} />
</View>
</ScrollView>
);
}
......
Supports Markdown
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