From d621d79c5760f12400471ff5b6f3ffd9fb782c38 Mon Sep 17 00:00:00 2001 From: whysman Date: Fri, 25 Apr 2025 01:06:43 -0400 Subject: [PATCH] changing layout --- components/Location.tsx | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/components/Location.tsx b/components/Location.tsx index 3220974..2c30619 100644 --- a/components/Location.tsx +++ b/components/Location.tsx @@ -1,5 +1,5 @@ import React, { useState } from "react"; -import { Dialog, TextInput, useTheme, Button } from "react-native-paper"; +import { Dialog, TextInput, useTheme, Button, Text } from "react-native-paper"; import { View } from "react-native"; import axios from "axios"; import * as Location from "expo-location"; @@ -13,7 +13,6 @@ const LocationComponent = () => { const [loading, setLoading] = useState(false); const [locLoading, setLocLoading] = useState(false); - // Handle submit by zip const handleSubmit = async () => { if (!zip) return; setLoading(true); @@ -22,14 +21,12 @@ const LocationComponent = () => { log.error(response.data); const long = response.data[0]; const lat = response.data[1]; - // Do something with long/lat as needed } catch (err) { log.error(err); } setLoading(false); }; - // Handle device geolocation const handleGetLocation = async () => { setLocLoading(true); try { @@ -42,7 +39,6 @@ const LocationComponent = () => { let location = await Location.getCurrentPositionAsync({}); const { longitude, latitude } = location.coords; log.error([longitude, latitude]); - // Do something with longitude/latitude as needed } catch (err) { log.error("Location Error:", err); } @@ -50,35 +46,39 @@ const LocationComponent = () => { }; return ( - - - - + + + OR + + + + );