ChatRoomConfig.js 3.9 KB
import React, { Component } from 'react';
import { View, Text, StyleSheet,TouchableOpacity,Image, TextInput, Dimensions } from 'react-native';
import CheckBox from '@react-native-community/checkbox'
import X from '../../assets/X.svg'
import { ScrollView } from 'react-native-gesture-handler';
import Heart from '../../assets/heart_.svg'
import Chat from '../../assets/chat_.svg'
import Home from '../../assets/home.svg'
import QR from '../../assets/qr.svg'
import Alarm from '../../assets/alarm.svg'

import Notice from '../Notice'
import {get} from 'axios'
import { SERVER } from '../../common/servername';

export default class AddTab extends Component {
    static navigationOptions = {
        
        headerShown: false
        
    }
    constructor(props) {
        super(props)

    }
    state = {
        currentState:0,
        Store:{},
    }
    componentDidMount() {
        if(this.props.navigation.state.params ) {
            
            get(`http://${SERVER}/stores/${this.props.navigation.state.params.id}`).then(res => {
                this.setState({
                    Store:res.data.data[0]
                })
            })
        }
    }
    render() {
        return (
            <View style={{height:"100%"}}>
                <View style={{width:"100%",flexDirection:"row",paddingTop:16,paddingBottom:16,paddingLeft:16,backgroundColor:"#615F5F"}}>
                    <TouchableOpacity onPress={() => this.props.navigation.goBack(null)}>
                        <Image source={require('../../assets/back.png')}/>
                    </TouchableOpacity>
                    <Text style={{color:"white",fontSize:16,marginLeft:16}}>
                        대화설정
                    </Text>
                </View>
                <ScrollView style={{paddingTop:24}}>
                    <Image style={{width:127.36,height:82,alignSelf:"center"}} resizeMode="stretch" source={require('../../assets/img.png')}/>
                    <Text style={{marginTop:24,color:"#5F6161",fontSize:15,textAlign:"center"}}>
                        {this.state.Store.name}
                    </Text>
                    <View style={{marginTop:39,marginBottom:16}}>
                        <TouchableOpacity style={{paddingLeft:16,paddingRight:16,backgroundColor:"white"}}>
                            <Text style={{paddingTop:12,paddingBottom:16,paddingLeft:25,fontSize:13,color:"#615F5F",backgroundColor:"white",borderBottomColor:"#BDBCBC",borderBottomWidth:1}}>
                                대화내용 삭제
                            </Text>
                        </TouchableOpacity>
                        <TouchableOpacity style={{paddingLeft:16,paddingRight:16,backgroundColor:"white"}}>
                            <Text style={{paddingTop:12,paddingBottom:16,paddingLeft:25,fontSize:13,color:"#615F5F",backgroundColor:"white"}}>
                                대화내용 내보내기
                            </Text>
                        </TouchableOpacity>
                    </View>
                    <View>
                        <TouchableOpacity style={{paddingLeft:16,paddingRight:16,backgroundColor:"white"}}>
                            <Text style={{paddingTop:12,paddingBottom:16,paddingLeft:25,fontSize:13,color:"#615F5F",backgroundColor:"white"}}>
                                대화차단
                            </Text>
                        </TouchableOpacity>

                    </View>
                </ScrollView>
                <TouchableOpacity style={{backgroundColor:"#FFD63A",paddingTop:21,paddingBottom:19}}>
                    <Text style={{textAlign:"center",color:"black",fontWeight:"bold",fontSize:15}}>
                        채팅방 나가기
                    </Text>
                </TouchableOpacity>
            </View>
        );
    }
}
 
const style = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center',
    }
});