From c8c7efd0e8c71eb6daddcaa46454af784a960221 Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Fri, 5 Nov 2021 22:27:12 -0300 Subject: [PATCH] Enabling to close loading modal --- src/app/components/LoadingMarkersModal.js | 24 ++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/app/components/LoadingMarkersModal.js b/src/app/components/LoadingMarkersModal.js index e0b2d31..9ee53b1 100644 --- a/src/app/components/LoadingMarkersModal.js +++ b/src/app/components/LoadingMarkersModal.js @@ -1,10 +1,11 @@ -import React from "react"; +import React, { useState } from "react"; import { Modal, StyleSheet, Text, TouchableHighlight, View, + TouchableOpacity, } from "react-native"; import { MaterialCommunityIcons } from "@expo/vector-icons"; @@ -12,10 +13,27 @@ import colors from "../config/colors"; import { dimensions, screen_height } from "../config/dimensions"; export default function LoadingMarkersModal({ show }) { - if (show) { + const [closed, setClosed] = useState(false); + if (show && !closed) { return ( + // NOTE: // 267 = (tabBar height = 49) + (data menu btn height = 48) + (this modal = 170/2) + + setClosed(true)}> + + +