Skip to content

Commit

Permalink
fix(ux): onboarding share contact
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Aug 5, 2019
1 parent ed83927 commit f0faf95
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions client/packages/screen/Accounts/Onboarding/Contacts.js
Expand Up @@ -7,8 +7,8 @@ import { NextButton, SkipButton } from './Button'
import { withNamespaces } from 'react-i18next'
import { shareLinkSelf } from '@berty/common/helpers/contacts'
import colors from '@berty/common/constants/colors'
import { Store } from '@berty/container'

// @withCurrentUser
const Contacts = ({ navigation, currentUser, t }) => (
<View style={{ backgroundColor: colors.white, flex: 1 }}>
<ScrollView alwaysBounceVertical={false}>
Expand All @@ -23,16 +23,20 @@ const Contacts = ({ navigation, currentUser, t }) => (
{t('onboarding.contacts.link-disclaimer')}
</Text>
<View style={{ height: 60, flexDirection: 'row' }}>
<NextButton
onPress={() =>
shareLinkSelf({
id: currentUser.id,
displayName: currentUser.displayName,
})
}
>
{t('onboarding.contacts.link-share')}
</NextButton>
<Store.Entity.Contact status={42}>
{currentUser => (
<NextButton
onPress={() =>
shareLinkSelf({
id: currentUser.id,
displayName: currentUser.displayName,
})
}
>
{t('onboarding.contacts.link-share')}
</NextButton>
)}
</Store.Entity.Contact>
</View>
<View style={{ height: 60, flexDirection: 'row' }}>
<SkipButton />
Expand Down

0 comments on commit f0faf95

Please sign in to comment.