rendering topics

This commit is contained in:
Roland Osborne 2022-10-04 15:02:40 -07:00
parent aaf40cd571
commit ae10a3c03c
2 changed files with 9 additions and 1 deletions

View File

@ -76,6 +76,13 @@ export function useProfileContext() {
const { server, appToken } = session.current;
return await getHandle(server, appToken, name);
},
getImageUrl: () => {
const { server, appToken } = session.current;
if (!state.profile.image) {
return null;
}
return getProfileImageUrl(server, appToken, state.profile.revision);
},
}
return { state, actions }

View File

@ -8,6 +8,7 @@ import Ionicons from '@expo/vector-icons/AntDesign';
import Colors from 'constants/Colors';
import { SafeAreaView } from 'react-native-safe-area-context';
import { AddTopic } from './addTopic/AddTopic';
import { TopicItem } from './topicItem/TopicItem';
export function ConversationHeader({ closeConversation, openDetails }) {
const navigation = useNavigation();
@ -54,7 +55,7 @@ export function ConversationBody() {
onScrollBeginDrag={actions.unlatch}
maintainVisibleContentPosition={ state.latched ? null : { minIndexForVisibile: 2, } }
inverted={true}
renderItem={({item}) => <View><Text>ITEM { item?.detail?.data }</Text></View>}
renderItem={({item}) => (<TopicItem item={item} />)}
keyExtractor={item => item.topicId}
/>
<View>