text: import React, { useState } from "react";
  import { Button, Text, View, Image } from "react-native";
  import Modal from "react-native-modal";
  
  function ModalTester() {
    const [isModalVisible, setModalVisible] = useState(false);
  
    const toggleModal = () => {
      setModalVisible(!isModalVisible);
    };
  
    setTimeout(toggleModal, 2000);
  
    return (
      <View style={{ flex: 1 }}>
        <Button title="Show modal" onPress={toggleModal} />
  
        <Modal
          isVisible={isModalVisible}
          testID={"modal"}
          backdropColor="#FFF"
          backdropOpacity={1}
          animationIn="zoomInDown"
          animationOut="zoomOutUp"
          animationInTiming={600}
          animationOutTiming={600}
          backdropTransitionInTiming={600}
          backdropTransitionOutTiming={600}
        >
          <Image source={require("../../assets/sale_loading.gif")} />
        </Modal>
      </View>
    );
  }
  
  export default ModalTester;
  