diff --git a/src/components/Api/Api.tsx b/src/components/Api/Api.tsx
index 20a3151..e1eb813 100644
--- a/src/components/Api/Api.tsx
+++ b/src/components/Api/Api.tsx
@@ -12,7 +12,7 @@ import {
export let backendURL = "";
export let backendURLWebsocket = "";
let use_production = true;
-if (__DEV__ || !use_production) {
+if (__DEV__ && !use_production) {
backendURL = "http://10.0.10.8:8000";
backendURLWebsocket = "ws://10.0.10.8:8000";
} else {
@@ -25,6 +25,8 @@ const instance = axios.create({
timeout: 1000,
});
+console.log(backendURL);
+
// App APIs
// Token Handling
diff --git a/src/routes/Home/Home.tsx b/src/routes/Home/Home.tsx
index f80af2e..f18c804 100644
--- a/src/routes/Home/Home.tsx
+++ b/src/routes/Home/Home.tsx
@@ -19,8 +19,8 @@ export default function Home() {
const ustpCoords = {
latitude: 8.4857,
longitude: 124.6565,
- latitudeDelta: 0.000235,
- longitudeDelta: 0.000067,
+ latitudeDelta: 0.4,
+ longitudeDelta: 0.4,
};
async function requestLocation() {
const { status } = await Location.requestForegroundPermissionsAsync();
@@ -62,27 +62,19 @@ export default function Home() {
let dist = GetDistance(
location.coords.latitude,
location.coords.longitude,
- 8.4857, // LatitudeDelta
- 124.6565 // LongitudeDelta
+ 0.4,
+ 0.4
);
setDist(Math.round(dist));
}
function CustomMap() {
if (dist && location) {
- if (dist <= 1.5) {
+ if (dist >= 2) {
// Just switch this condition for map debugging
return (
+ onPress={() => console.log(location)}
+ pinColor={colors.primary_1}
+ >
+
+
+ You are here {"\n"}
+ X: {Math.round(location.coords.longitude) + "\n"}
+ Z: {Math.round(location.coords.latitude)}
+
+
+
);
} else {
@@ -145,6 +163,7 @@ export default function Home() {
latitudeDelta: 0.0922,
longitudeDelta: 0.0421,
}}
+ loadingBackgroundColor={colors.secondary_2}
>
+ You are here {"\n"}
X: {Math.round(location.coords.longitude) + "\n"}
Z: {Math.round(location.coords.latitude)}
diff --git a/src/routes/Login/Login.tsx b/src/routes/Login/Login.tsx
index 34a3d6f..8789fad 100644
--- a/src/routes/Login/Login.tsx
+++ b/src/routes/Login/Login.tsx
@@ -94,7 +94,7 @@ export default function Login() {
}
console.log(JSON.stringify(user_info));
} else {
- console.log("heh", ParseLoginError(JSON.stringify(result[1])));
+ console.log(ParseLoginError(JSON.stringify(result[1])));
setError(ParseLoginError(JSON.stringify(result[1])));
}
});