text: import React, { useState, useEffect } from 'react'
  import { View, Text, StyleSheet, FlatList, Image } from 'react-native'
  import yelp from '../api/yelp'
  
  const ResultsShowScreen = ({ navigation }) => {
      const [result, setResult] = useState(null);
      const id = navigation.getParam('id');
  
      const getResult = async (id) => {
          const { data } = await yelp.get(`/${id}`);
          setResult(data);
      }
  
      useEffect(() => {
          getResult(id);
      }, [])
  
      if (!result) {
          return null
      }
  
      return (
          <View>
              <Text>{result.name}</Text>
              <FlatList
                  keyExtractor={photo => photo}
                  data={result.photos}
                  renderItem={({ item }) => {
                      return (
                          <Image style={styles.imageStyle} source={{ uri: item }} />
                      );
                  }}
              />
          </View>
      )
  }
  
  const styles = StyleSheet.create({
      imageStyle: {
          height: 200,
          width: 300
      }
  })
  
  export default ResultsShowScreen
  