유희정

setting tab id 수정

1 import React, { Component } from 'react'; 1 import React, { Component } from 'react';
2 import { View, Text, StyleSheet, TextInput, TouchableOpacity, Image } from 'react-native'; 2 import { View, Text, StyleSheet, TextInput, TouchableOpacity, Image } from 'react-native';
3 import AddButton from '../component/AddButton' 3 import AddButton from '../component/AddButton'
4 -import {delete_all_data, deleteId} from '../component/DBhelper' 4 +import {delete_all_data, deleteId, get_id} from '../component/DBhelper'
5 5
6 var date = new Date(); 6 var date = new Date();
7 date.setHours(date.getHours()+9); 7 date.setHours(date.getHours()+9);
...@@ -11,7 +11,7 @@ export default class SettingTab extends Component { ...@@ -11,7 +11,7 @@ export default class SettingTab extends Component {
11 constructor(props){ 11 constructor(props){
12 super(props); 12 super(props);
13 this.state = { 13 this.state = {
14 - ID : 'pi1', 14 + ID : get_id(),
15 user : 'user1' 15 user : 'user1'
16 } 16 }
17 } 17 }
...@@ -41,7 +41,7 @@ export default class SettingTab extends Component { ...@@ -41,7 +41,7 @@ export default class SettingTab extends Component {
41 this.setState({ID: ''}) 41 this.setState({ID: ''})
42 //save_app_data() 42 //save_app_data()
43 delete_all_data() 43 delete_all_data()
44 - //deleteId() 44 + deleteId()
45 this.props.navigation.navigate('Login'); 45 this.props.navigation.navigate('Login');
46 } 46 }
47 render() { 47 render() {
......