-
Notifications
You must be signed in to change notification settings - Fork 0
/
PostScreen.js
74 lines (64 loc) · 1.94 KB
/
PostScreen.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import React, { Component } from "react";
import { View, Text, Button, StyleSheet , ScrollView } from 'react-native';
import LoginScreen from "./LoginScreen";
import firestore , { doc } from '@react-native-firebase/firestore';
import Load_post2 from "./load";
const style = StyleSheet.create({
container: {
backgroundColor: '#B9BFFF',
flex: 1
},
text: {
fontSize: 30,
color: '#21610B',
textAlign: 'center'
},
Button: {
color: 'black',
fontSize: 40,
},
input: {
height: 40,
margin: 50,
borderWidth: 5,
padding: 10,
color: 'black'
},
})
export default class PostScreen extends Component {
state = {
prevID : this.props.route.params.prevID,
doc_id : this.props.route.params.doc_id,
doc_item : this.props.route.params.doc_item,
}
render() {
console.log("***** Post Screen 의 State : " , this.state)
return (
<View style={style.container}>
<ScrollView>
<Text style={{ fontSize: 30 }}>Post Screen</Text>
<Button color={style.Button.color} onPress={() => this.backToMainScreen()} title='메인화면' />
<Load_post2 id ={this.state.doc_id} item ={this.state.doc_item} />
</ScrollView>
</View>
)
}
backToMainScreen() {
this.props.navigation.navigate('Main',{prevID : this.state.prevID})
}
goToChatScreen() {
this.props.navigation.navigate('Chat')
}
goToSuggetScreen() {
this.props.navigation.navigate('Suggest')
}
goToVoteScreen() {
this.props.navigation.navigate('Vote')
}
goFilterScreen() {
this.props.navigation.navigate('Filter')
}
goEditScreen() {
this.props.navigation.navigate("Edit")
}
}