@@ -61,7 +61,7 @@ export default class NotesComponent extends React.Component {
6161 this . setState ( { notes :DATA , notes_len :DATA . length } ) ;
6262 }
6363
64-
64+
6565 rightHeader = ( ) => {
6666 return (
6767 < View style = { { alignItems :'center' , justifyContent :'center' , right :'10%' } } >
@@ -94,25 +94,24 @@ export default class NotesComponent extends React.Component {
9494 < ActivityIndicator size = "large" color = "white" />
9595 </ View >
9696 :
97- < View style = { styles . body } >
97+ this . state . notes_len == 0 ? < View style = { { flex : 1 , backgroundColor :"#212121" , justifyContent :'center' , alignItems :'center' } } >
98+ < Paragraph style = { { fontSize :20 } } > It's lonely in here...</ Paragraph >
99+ </ View >
100+ :< View style = { styles . body } >
98101
99102 < ScrollView >
100103 < FlatList
101104 data = { this . state . notes }
102105 nestedScrollEnabled = { true }
103- style = { { marginTop :10 } }
106+ style = { { marginTop :20 } }
104107 renderItem = { ( { item } ) => (
105- this . state . notes_len == 0 ?
106- < View style = { { flex : 1 , backgroundColor :"#212121" , justifyContent :'center' , alignItems :'center' } } >
107- < Text > No Notes Yet</ Text >
108- </ View >
109- :
108+
110109 < TouchableOpacity
111110 style = { { flex : 1 , flexDirection : 'column' , margin : 1 , marginBottom :30 } }
112111 onPress = { ( ) => this . props . route . navigation . navigate ( 'AddNoteComponent' , { note :item , flag :1 , navigation :this . props . route . navigation } ) }
113112 activeOpacity = { 0.2 }
114113 >
115- < View style = { { borderColor :'#ddd' , borderWidth :0.5 , marginHorizontal :'2 %' , borderRadius :10 } } >
114+ < View style = { { borderColor :'#ddd' , borderWidth :0.5 , marginHorizontal :'8 %' , borderRadius :10 } } >
116115 < View style = { { backgroundColor :'#ddd' , borderTopLeftRadius :10 , borderTopRightRadius :10 } } >
117116 < Title style = { { alignContent :'center' , alignItems :'center' , alignSelf :'center' , color :'black' } } > { item . title } </ Title >
118117 </ View >
0 commit comments