From 8a9c0f221ee2893ed084f075d80e17c9d650e4dd Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Thu, 7 Oct 2021 21:30:07 -0300 Subject: [PATCH] Fixing bug in loading modal --- src/app/components/LoadingMarkersModal.js | 48 +++++++++-------------- src/app/screens/MapFeedScreen.js | 6 +-- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/src/app/components/LoadingMarkersModal.js b/src/app/components/LoadingMarkersModal.js index 30f94bb..e0b2d31 100644 --- a/src/app/components/LoadingMarkersModal.js +++ b/src/app/components/LoadingMarkersModal.js @@ -9,42 +9,32 @@ import { import { MaterialCommunityIcons } from "@expo/vector-icons"; import colors from "../config/colors"; -import { dimensions } from "../config/dimensions"; +import { dimensions, screen_height } from "../config/dimensions"; export default function LoadingMarkersModal({ show }) { - return ( - - - - - - Aguarde um momento enquanto os dados são carregados - - + if (show) { + return ( + // 267 = (tabBar height = 49) + (data menu btn height = 48) + (this modal = 170/2) + + + + Aguarde um momento enquanto os dados são carregados + - - ); + ); + } else { + return <>; + } } const styles = StyleSheet.create({ container: { + position: "absolute", width: "80%", height: 170, justifyContent: "center", diff --git a/src/app/screens/MapFeedScreen.js b/src/app/screens/MapFeedScreen.js index 93a1904..d21c1d8 100644 --- a/src/app/screens/MapFeedScreen.js +++ b/src/app/screens/MapFeedScreen.js @@ -29,14 +29,14 @@ export default function MapFeedScreen(props) { return ( - + /> + ); }