File tree 2 files changed +11
-7
lines changed
2 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 9
9
import PostCard from '../components/PostCard' ;
10
10
import color from '../theme/color' ;
11
11
import config from '../config' ;
12
- import shuffle from '../utils/shuffle' ;
12
+ // import shuffle from '../utils/shuffle';
13
13
14
14
const GET_DATA_URL = `${ config . baseUrl } /posts` ;
15
15
@@ -46,7 +46,7 @@ class FeedScreen extends React.Component {
46
46
< View style = { styles . container } >
47
47
< View style = { styles . headerContainer } >
48
48
< Text style = { styles . headerText } >
49
- { '🤷🏻♂️ Ipsum' }
49
+ { 'Ipsum Diary ' }
50
50
</ Text >
51
51
</ View >
52
52
{
Original file line number Diff line number Diff line change 1
1
import React from 'react' ;
2
2
import {
3
- View ,
3
+ ScrollView ,
4
4
StyleSheet ,
5
5
KeyboardAvoidingView ,
6
6
Platform ,
@@ -27,6 +27,7 @@ const DescriptionInput = styled.TextInput`
27
27
borderRadius: 4px;
28
28
fontSize: 14;
29
29
height: 200px;
30
+ textAlignVertical: top;
30
31
` ;
31
32
32
33
const SubmitButton = styled . TouchableOpacity `
@@ -52,7 +53,7 @@ class NewPostScreen extends React.Component {
52
53
53
54
checkIfEditPost = ( ) => {
54
55
const { navigation : { state : { params } } } = this . props ;
55
- this . setState ( { isEditPost : ! ! params . id } ) ;
56
+ this . setState ( { isEditPost : ! ! params } ) ;
56
57
}
57
58
58
59
handleSubmitPost = async ( ) => {
@@ -107,11 +108,14 @@ class NewPostScreen extends React.Component {
107
108
return (
108
109
< KeyboardAvoidingView
109
110
style = { styles . container }
110
- behavior = " padding"
111
+ behavior = { isPlatformIOS ? ' padding' : null }
111
112
keyboardVerticalOffset = { isPlatformIOS ? 18 : 0 }
112
113
>
113
114
< Header />
114
- < View style = { styles . content } >
115
+ < ScrollView
116
+ style = { styles . content }
117
+ keyboardShouldPersistTaps = "handled"
118
+ >
115
119
< TitleInput
116
120
innerRef = { ( x ) => { this . titleRef = x ; } }
117
121
placeholder = "Your awesome title..."
@@ -128,7 +132,7 @@ class NewPostScreen extends React.Component {
128
132
multiline
129
133
defaultValue = { isEditPost ? params . description : '' }
130
134
/>
131
- </ View >
135
+ </ ScrollView >
132
136
< SubmitButton
133
137
onPress = { isEditPost ? this . handleEditPost : this . handleSubmitPost }
134
138
>
You can’t perform that action at this time.
0 commit comments