export default function AboutScreen({ route }) {
const [postList,setPostList] = useState([''])
const { name } = route.params;
const [ text, setText ] = useState('');
const fetchData = async () => {
const response = await fetch(
'https://cookiebytes.ca/google-login-php/Jacob11.php?name=' + name
);
const data = await response.text()
const split = data.split('||');
const text = response.text()
console.log(data)
setPostList(split)
}
useEffect(() => {
fetchData();
}, []);
onLight = (selectedVariable: string) => {
// Your logic for function 1
console.log(selectedVariable)
AsyncStorage.setItem('any_key_herCreative', selectedVariable)
navigation.navigate("Pix||", {
name: selectedVariable})
}
return (
<FlatList
data={postList}
renderItem={({ item }) => {
return (
<TouchableWithoutFeedback onPress={ () => handleClick(item)}>
<Card.Cover
source={{ uri: 'https://www.cookiebytes.ca/google-login-php/' + item}}
theme={{
roundness: 0,
isV3: false,
}}
/>
</TouchableWithoutFeedback>
)
}}
/>
);
}
Extra post appears at end of flatlist
I’ll post Php when I can It just wont allow for smooth scrolling effect with an extra post at the end of each flatlist! If anyone can help would be greatly appreciated!