showing add button as footer

This commit is contained in:
Nouman Tahir 2021-03-14 00:42:31 +05:00
parent 8b06184657
commit d8c0c50689

View File

@ -32,6 +32,13 @@ const SnippetsModal = ({ username, handleOnSelect }) => {
return (
<>
<Text style={styles.title}>Nothing here</Text>
</>
);
};
const _renderListFooter = () => {
return (
<>
<MainButton
style={{ width: 150 }}
onPress={() => Alert.alert('create new snippet')}
@ -58,6 +65,7 @@ const SnippetsModal = ({ username, handleOnSelect }) => {
</TouchableOpacity>
)}
ListEmptyComponent={_renderEmptyContent}
ListFooterComponent={_renderListFooter}
/>
</View>
</View>