diff --git a/components/app-wrapper.js b/components/app-wrapper.js index 90a904e..0ac1748 100644 --- a/components/app-wrapper.js +++ b/components/app-wrapper.js @@ -18,14 +18,13 @@ export default class AppWrapper extends Component { async checkLicenseAgreement() { const agreed = await getLicenseFlag() - console.log(agreed) if (agreed) this.setState({showLicense: false}) } render() { return ( this.state.showLicense ? - + this.setState({showLicense: false})}/> : {this.state.showApp ? diff --git a/components/button.js b/components/button.js index 696c918..70d778e 100644 --- a/components/button.js +++ b/components/button.js @@ -1,18 +1,20 @@ import React from 'react' -import { View } from 'react-native' +import { TouchableOpacity } from 'react-native' import AppText from './app-text' import styles from '../styles' -export default function Button({ backgroundColor, style, children }) { +export default function Button(props) { return ( - + - {children} + {props.children} - + ) } \ No newline at end of file diff --git a/components/home.js b/components/home.js index ffba42f..37e04c2 100644 --- a/components/home.js +++ b/components/home.js @@ -66,7 +66,9 @@ export default class Home extends Component { {cycleDayMoreText} } - @@ -91,7 +93,9 @@ export default class Home extends Component { } - @@ -124,7 +128,9 @@ export default class Home extends Component { } - diff --git a/components/license.js b/components/license.js index 4e5027d..0da53e1 100644 --- a/components/license.js +++ b/components/license.js @@ -1,19 +1,31 @@ import React from 'react' -import { ScrollView, View } from 'react-native' +import { ScrollView, View, BackHandler } from 'react-native' import AppText from './app-text' import { licenseText, shared } from '../i18n/en/labels' import styles,{secondaryColor} from '../styles' import Button from './button' +import { saveLicenseFlag } from '../local-storage'; -export default function License() { +export default function License({setLicense}) { return ( {licenseText} - -