| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- import React, { Component } from 'react';
- import { View, Text, StyleSheet, Image, Linking } from 'react-native';
- import Button from '../../components/Button';
- import app from '../../../app.json';
- import TextView from '../../components/TextView';
- export default class Contact extends Component {
- constructor(props) {
- super(props);
- this.state = {
- };
- }
- callPhone() {
- Linking.openURL("tel:" + app.modules.support.phone)
- }
- callWhatapp() {
- Linking.openURL(app.modules.support.whatsapp)
- }
- render() {
- return (
- <View style={styles.container}>
- <View style={ui.center}>
- <Image
- style={styles.logo}
- resizeMode='contain'
- source={require('../../images/about-logo.png')}/>
- </View>
- <TextView style={styles.labelText}>{$t("support.labelOpenTime")}</TextView>
- <TextView style={styles.contentText}>{$t("support.timeAllDay")}</TextView>
- <View style={ui.flex1}></View>
- <Button
- text={$t("support.btnCallSupport")}
- style={styles.buttonPrimary}
- onClick={() => this.callPhone()}
- disabled={!app.modules.support.phone}
- />
- <Button
- text={$t("support.btnWhatsapp")}
- disabled={!app.modules.support.whatsapp}
- onClick={() => this.callWhatapp()}
- />
- </View>
- );
- }
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- padding: 16,
- backgroundColor: colorLight
- },
- logo: {
- width: 215,
- height: 70,
- marginTop: 16,
- marginBottom: 12
- },
- labelText: {
- color: textPrimary,
- fontSize: 18,
- fontWeight: 'bold',
- paddingTop: 16,
- paddingBottom: 8
- },
- contentText: {
- color: textSecondary,
- fontSize: 16
- },
- buttonPrimary: {
- marginBottom: 16,
- backgroundColor: colorPrimary
- }
- })
|