Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter usmansagri

    (@usmansagri)

    There was issue with applying .webp images to react native <Image/>. Working absolutely fine now 🙂

    Forum: Fixing WordPress
    In reply to: Modify date object
    Thread Starter usmansagri

    (@usmansagri)

    How can i achieve that in the following code? i have to fetch all the posts and their timestamp!

    return(
          <View style={styles.container}>
             {isLoading ? (<ActivityIndicator />): (
             <FlatList 
              data={catPost}
              keyExtractor={({ id },index) => id}
              renderItem={({ item }) => (
                <TouchableOpacity onPress={() =>  navigation.navigate('CatPostModal')}>
                  {item.featured_media>0?<Image style={{width:Dimensions.width,height:250}} source={{
                      uri: item.imageLink
                    }}/>:null}
                  <View style={{padding:5,backgroundColor:'#fff',margin:5}}><Text style={{fontWeight:'bold',color:'#3578e5',fontSize:20,marginTop:5}}>{item.title.rendered}</Text>
                  <Text style={{color:'#000',marginTop:5}}>{item.date}</Text>
                  </View>
                </TouchableOpacity>
              )
            }
            />
          )}
          </View>
        )
Viewing 2 replies - 1 through 2 (of 2 total)