@@ -29,10 +29,10 @@ import { FlatList } from 'react-native-gesture-handler'
2929import { getLastReaction } from '../../Functions/DatabaseFunctions/Reactions'
3030
3131interface HomeFeedProps {
32- jumpTo : ( tabName : string ) => void
32+ navigation : any
3333}
3434
35- export const HomeFeed : React . FC < HomeFeedProps > = ( { jumpTo } ) => {
35+ export const HomeFeed : React . FC < HomeFeedProps > = ( { navigation } ) => {
3636 const theme = useTheme ( )
3737 const { database } = useContext ( AppContext )
3838 const { publicKey } = useContext ( UserContext )
@@ -90,7 +90,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
9090 authors,
9191 }
9292 if ( lastNote && lastNotes . length >= pageSize && ! past ) {
93- message . since = lastNote . created_at
93+ message . since = lastNote ? .created_at
9494 } else {
9595 message . limit = pageSize + initialPageSize
9696 }
@@ -99,7 +99,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
9999 {
100100 kinds : [ EventKind . petNames ] ,
101101 authors : users . filter ( ( user ) => user . name !== undefined ) . map ( ( user ) => user . id ) ,
102- since : users [ 0 ] . created_at ?? 0 ,
102+ since : users [ 0 ] ? .created_at ?? 0 ,
103103 } ,
104104 ] )
105105 setRefreshing ( false )
@@ -190,7 +190,7 @@ export const HomeFeed: React.FC<HomeFeedProps> = ({ jumpTo }) => {
190190 < Text variant = 'bodyMedium' style = { styles . center } >
191191 { t ( 'homeFeed.emptyDescription' ) }
192192 </ Text >
193- < Button mode = 'contained' compact onPress = { ( ) => jumpTo ( 'contacts' ) } >
193+ < Button mode = 'contained' compact onPress = { ( ) => navigation . jumpTo ( 'contacts' ) } >
194194 { t ( 'homeFeed.emptyButton' ) }
195195 </ Button >
196196 </ View >
@@ -235,8 +235,8 @@ const styles = StyleSheet.create({
235235 } ,
236236 blank : {
237237 justifyContent : 'space-between' ,
238- height : 200 ,
239- marginTop : 60 ,
238+ height : 220 ,
239+ marginTop : 91 ,
240240 } ,
241241} )
242242
0 commit comments