-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:GoodDollar/GoodDAPP
- Loading branch information
Showing
19 changed files
with
344 additions
and
150 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
import React from 'react' | ||
import { View } from 'react-native' | ||
import { CheckBox as WebCheckBox } from 'react-native-web' | ||
import RNCheckBox from '@react-native-community/checkbox' | ||
import { isMobileNative } from '../../../lib/utils/platform' | ||
import { withStyles } from '../../../lib/styles' | ||
|
||
const CheckBox = ({ onClick, children }) => ( | ||
<label style={{ marginBottom: 24, display: 'flex', alignItems: 'center', flexDirection: 'row' }}> | ||
<input type="checkbox" onClick={onClick} style={{ width: 24, height: 24 }} /> | ||
const CheckBoxComponent = isMobileNative ? RNCheckBox : WebCheckBox | ||
const CheckBox = ({ onClick, value, styles, children }) => ( | ||
<View style={styles.container}> | ||
<CheckBoxComponent value={value} onValueChange={onClick} style={styles.checkbox} /> | ||
{children} | ||
</label> | ||
</View> | ||
) | ||
|
||
export default CheckBox | ||
const mapStylesToProps = () => ({ | ||
container: { | ||
flexDirection: 'row', | ||
alignItems: 'center', | ||
}, | ||
checkbox: { | ||
width: 24, | ||
height: 24, | ||
marginRight: 8, | ||
}, | ||
}) | ||
|
||
export default withStyles(mapStylesToProps)(CheckBox) | ||
|
||
// export default CheckBox |
This file was deleted.
Oops, something went wrong.
88 changes: 88 additions & 0 deletions
88
src/components/faceVerification/components/AgeCheckError.jsx
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,88 @@ | ||
import React, { useEffect } from 'react' | ||
import { View } from 'react-native' | ||
import { t } from '@lingui/macro' | ||
|
||
import Text from '../../common/view/Text' | ||
import Separator from '../../common/layout/Separator' | ||
import { Section } from '../../common' | ||
import FaceVerificationErrorSmiley from '../../common/animations/FaceVerificationErrorSmiley' | ||
|
||
import { isMobileOnly } from '../../../lib/utils/platform' | ||
import { getDesignRelativeHeight, getDesignRelativeWidth } from '../../../lib/utils/sizes' | ||
import { withStyles } from '../../../lib/styles' | ||
|
||
import { fireEvent, FV_AGECHECKERROR } from '../../../lib/analytics/analytics' | ||
|
||
const AgeCheckError = ({ styles, displayTitle, onRetry, nav, exception }) => { | ||
useEffect(() => { | ||
if (!exception) { | ||
return | ||
} | ||
|
||
fireEvent(FV_AGECHECKERROR) | ||
}, []) | ||
|
||
return ( | ||
<Section style={styles.descriptionContainer} justifyContent="space-evenly"> | ||
<Section.Title fontWeight="medium" textTransform="none" color="red"> | ||
{t`You must be 18 years or older to get verified.`} | ||
</Section.Title> | ||
<Section.Row justifyContent="space-around"> | ||
<View style={styles.halfIllustration}> | ||
<FaceVerificationErrorSmiley /> | ||
</View> | ||
</Section.Row> | ||
<Section style={styles.errorSection}> | ||
<Separator width={2} /> | ||
<View style={styles.descriptionWrapper}> | ||
<Text color="primary" fontWeight="bold" fontSize={18} lineHeight={25}> | ||
{t`It seems your are under 18 years of age.`} | ||
</Text> | ||
<Text color="primary" fontSize={18} lineHeight={25}> | ||
{t`If you think this is a mistake | ||
please contact support.`} | ||
</Text> | ||
</View> | ||
<Separator width={2} /> | ||
</Section> | ||
</Section> | ||
) | ||
} | ||
|
||
const getStylesFromProps = ({ theme }) => { | ||
return { | ||
halfIllustration: { | ||
marginTop: isMobileOnly ? getDesignRelativeHeight(25) : 0, | ||
marginBottom: isMobileOnly ? getDesignRelativeHeight(30) : 0, | ||
width: getDesignRelativeWidth(130, false), | ||
maxHeight: isMobileOnly ? getDesignRelativeHeight(97) : 'auto', | ||
display: 'flex', | ||
justifyContent: 'center', | ||
marginRight: 0, | ||
marginLeft: 0, | ||
}, | ||
descriptionContainer: { | ||
flex: 1, | ||
marginBottom: 0, | ||
paddingBottom: getDesignRelativeHeight(theme.sizes.defaultDouble), | ||
paddingLeft: getDesignRelativeWidth(theme.sizes.default), | ||
paddingRight: getDesignRelativeWidth(theme.sizes.default), | ||
paddingTop: getDesignRelativeHeight(theme.sizes.default), | ||
width: '100%', | ||
}, | ||
actionsSpace: { | ||
marginBottom: getDesignRelativeHeight(16), | ||
}, | ||
errorSection: { | ||
paddingBottom: 0, | ||
paddingTop: 0, | ||
marginBottom: 0, | ||
}, | ||
descriptionWrapper: { | ||
paddingTop: getDesignRelativeHeight(25), | ||
paddingBottom: getDesignRelativeHeight(25), | ||
}, | ||
} | ||
} | ||
|
||
export default withStyles(getStylesFromProps)(AgeCheckError) |
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
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
Oops, something went wrong.