Closed Ahsanali012 closed 4 months ago
Hi, I checked both android and ios and both worked as expected. I used this function: () => <View style={{ backgroundColor: 'red', width: '100%', height: 100 }} />. Are you sure your Button component renders correctly? I don't see any issue in your code.
Hi, I checked both android and ios and both worked as expected. I used this function: () => <View style={{ backgroundColor: 'red', width: '100%', height: 100 }} />. Are you sure your Button component renders correctly? I don't see any issue in your code.
I'll try again and let you know
@Ahsanali012 You are missing the return ..
renderFooter: () => return ( <View style={{ backgroundColor: 'red', padding: 10, alignSelf: 'center' }}>
<Button title="Share" onPress={handleSharePress} /> </View>
),
I cant show footer and also i need to show delete button so i can trigger delete for each story how can i do that ?
` const InstaStories = AllStoriesPosts?.map((story) => ({
id: story.id,
name: story.name,
imgUrl: story.imgUrl,
stories: story.stories.map((item) => ({
id: item.id,
mediaType: item.mediaType,
sourceUrl: item.sourceUrl,
renderContent: () => (
<View style={tw`mt-[15%] flex-row justify-between w-full p-3`}>
<Text style={tw`font-bold mx-2 text-base text-white`}>
{item?.description}
</Text>
{auth.isauth && (
<View style={tw``}>
{/* <Button title="Delete" onPress={() => deleteStory(item?.id)} /> */}
<Text style={tw`font-bold mx-2 text-base text-white`}>
delete
</Text>
</View>
)}
</View>
),
renderFooter: () => (
<View
style={{
backgroundColor: "red",
height: 50,
width: "100%",
padding: 10,
alignSelf: "center",
}}
>
<Text style={tw`font-bold mx-2 text-base text-white`}>Footer</Text>
</View>
),
})),
}));`
renderFooter is not working, As i want to show custom buttons , Can you provide me the example how can i work to show buttons?