import React, {useEffect, useLayoutEffect} from 'react' import {Image, StyleSheet, TouchableOpacity, View} from 'react-native' import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome' import {Shell} from '../../shell' import {Feed} from '../../com/feed/Feed' import type {RootTabsScreenProps} from '../../routes/types' import {useStores} from '../../../state' import {AVIS} from '../../lib/assets' export function Home({navigation}: RootTabsScreenProps<'HomeTab'>) { const store = useStores() useEffect(() => { console.log('Fetching home feed') store.homeFeed.setup() }, [store.homeFeed]) const onNavigateContent = (screen: string, props: Record) => { // @ts-ignore it's up to the callers to supply correct params -prf navigation.navigate(screen, props) } useLayoutEffect(() => { navigation.setOptions({ headerShown: true, headerTitle: 'V I B E', headerLeft: () => ( navigation.push('Profile', {name: 'alice.com'})}> ), headerRight: () => ( { navigation.push('Composer', {}) }}> ), }) }, [navigation]) return ( ) } const styles = StyleSheet.create({ avi: { width: 20, height: 20, borderRadius: 10, resizeMode: 'cover', }, })