From a04b36ba59cb9e2b364604d06fd912248bfac142 Mon Sep 17 00:00:00 2001 From: teamomiamigo Date: Mon, 16 Sep 2024 17:09:37 -0500 Subject: [PATCH 1/3] Fix: Issue #98 --- lib/components/tagging.tsx | 10 ++++----- lib/screens/mapPage/ExploreScreen.js | 31 ++++++++++++++-------------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/lib/components/tagging.tsx b/lib/components/tagging.tsx index b529877..df6713c 100644 --- a/lib/components/tagging.tsx +++ b/lib/components/tagging.tsx @@ -1,13 +1,13 @@ -import React, { useState, useRef } from "react"; +import { Ionicons } from "@expo/vector-icons"; +import React, { useState } from "react"; import { - View, - Text, - TouchableOpacity, StyleSheet, + Text, TextInput, + TouchableOpacity, + View, } from "react-native"; import { SwipeListView } from "react-native-swipe-list-view"; -import { Ionicons } from "@expo/vector-icons"; function TagWindow({ tags, diff --git a/lib/screens/mapPage/ExploreScreen.js b/lib/screens/mapPage/ExploreScreen.js index d0c0de6..e4269d1 100644 --- a/lib/screens/mapPage/ExploreScreen.js +++ b/lib/screens/mapPage/ExploreScreen.js @@ -1,26 +1,26 @@ -import React, { useEffect, useState, useRef, useCallback } from "react"; +import Constants from "expo-constants"; +import * as Location from "expo-location"; +import React, { useCallback, useEffect, useRef, useState } from "react"; import { + Animated, + Dimensions, + Image, + Keyboard, + Platform, StyleSheet, Text, TextInput, - View, - Animated, - Image, TouchableOpacity, - Dimensions, - Platform, + View, } from "react-native"; import MapView, { Marker } from "react-native-maps"; -import * as Location from "expo-location"; -import NoteDetailModal from "./NoteDetailModal"; -import { formatToLocalDateString } from "../../components/time"; import Ionicons from "react-native-vector-icons/Ionicons"; import MaterialCommunityIcons from "react-native-vector-icons/MaterialCommunityIcons"; -import { mapDarkStyle, mapStandardStyle } from "./mapData"; -import ApiService from "../../utils/api_calls"; -import Constants from "expo-constants"; -import { Keyboard } from "react-native"; import { useTheme } from "../../components/ThemeProvider"; +import { formatToLocalDateString } from "../../components/time"; +import ApiService from "../../utils/api_calls"; +import NoteDetailModal from "./NoteDetailModal"; +import { mapDarkStyle, mapStandardStyle } from "./mapData"; const { width } = Dimensions.get("window"); const CARD_HEIGHT = 220; @@ -649,12 +649,12 @@ const styles = StyleSheet.create({ position: "absolute", marginTop: Constants.statusBarHeight, flexDirection: "row", - backgroundColor: "#fff", + backgroundColor: theme.primaryColor, width: "90%", alignSelf: "center", borderRadius: 5, padding: 10, - shadowColor: "#ccc", + shadowColor: theme.text, shadowOffset: { width: 0, height: 3 }, shadowOpacity: 0.5, shadowRadius: 5, @@ -716,6 +716,7 @@ const styles = StyleSheet.create({ textContent: { flex: 2, padding: 10, + color: theme.text, }, cardtitle: { fontSize: 12, From 58d48c728526e320a603299a3333c8ba3db16de4 Mon Sep 17 00:00:00 2001 From: teamomiamigo Date: Mon, 30 Sep 2024 14:45:12 -0500 Subject: [PATCH 2/3] fix error 172 --- lib/components/colors.tsx | 2 +- lib/screens/HomeScreen.tsx | 32 ++++---- lib/screens/mapPage/ExploreScreen.js | 17 ++-- package.json | 2 + yarn.lock | 113 +++++++++++++++++++++++++-- 5 files changed, 136 insertions(+), 30 deletions(-) diff --git a/lib/components/colors.tsx b/lib/components/colors.tsx index 7359724..30c7d7d 100644 --- a/lib/components/colors.tsx +++ b/lib/components/colors.tsx @@ -24,7 +24,7 @@ export const colors = { black: '#161A1D', scrollerColor: '#161A1D', text: '#F7F8F9', - logout: '#DCDFE4', + logout: '#DCDFE4', logoutText: '#22272B', }, }; diff --git a/lib/screens/HomeScreen.tsx b/lib/screens/HomeScreen.tsx index 308a860..eb25d9b 100644 --- a/lib/screens/HomeScreen.tsx +++ b/lib/screens/HomeScreen.tsx @@ -1,29 +1,25 @@ -import React, { useState, useEffect } from "react"; +import { Ionicons } from "@expo/vector-icons"; +import Constants from "expo-constants"; +import React, { useEffect, useState } from "react"; import { + Dimensions, + Image, Platform, - View, + StyleSheet, Text, - ScrollView, TouchableOpacity, - StyleSheet, - Dimensions, - SafeAreaView, - Image, + View } from "react-native"; -import { Ionicons } from "@expo/vector-icons"; -import { User } from "../models/user_class"; -import { Note } from "../../types"; -import { HomeScreenProps } from "../../types"; -import ApiService from "../utils/api_calls"; -import DataConversion from "../utils/data_conversion"; +import DropDownPicker from 'react-native-dropdown-picker'; import { SwipeListView } from "react-native-swipe-list-view"; -import NoteSkeleton from "../components/noteSkeleton"; +import { HomeScreenProps, Note } from "../../types"; +import { useTheme } from '../components/ThemeProvider'; import LoadingImage from "../components/loadingImage"; +import NoteSkeleton from "../components/noteSkeleton"; import { formatToLocalDateString } from "../components/time"; -import { useTheme } from '../components/ThemeProvider'; -import Constants from "expo-constants"; -import ToastMessage from 'react-native-toast-message'; -import DropDownPicker from 'react-native-dropdown-picker'; +import { User } from "../models/user_class"; +import ApiService from "../utils/api_calls"; +import DataConversion from "../utils/data_conversion"; import NoteDetailModal from "./mapPage/NoteDetailModal"; const user = User.getInstance(); diff --git a/lib/screens/mapPage/ExploreScreen.js b/lib/screens/mapPage/ExploreScreen.js index 3012e5b..28c1c22 100644 --- a/lib/screens/mapPage/ExploreScreen.js +++ b/lib/screens/mapPage/ExploreScreen.js @@ -36,6 +36,9 @@ const ExploreScreen = () => { const { theme, isDarkmode } = useTheme(); const [showMapTypeOptions, setShowMapTypeOptions] = useState(false); + const styles = createstyles(theme, isDarkmode); + + const toggleMapTypeOptions = () => { setShowMapTypeOptions((prevState) => !prevState); }; @@ -149,7 +152,9 @@ const ExploreScreen = () => { fetchMessages(); }, [state, globeIcon, searchResults]); - const styles = StyleSheet.create({ + + + const createStyles = (theme, isDarkmode) => StyleSheet.create({ container: { flex: 1, }, @@ -157,12 +162,12 @@ const ExploreScreen = () => { position: "absolute", marginTop: Constants.statusBarHeight, flexDirection: "row", - backgroundColor: theme.primaryColor, + backgroundColor:"#ffff", width: "90%", alignSelf: "center", borderRadius: 5, padding: 10, - shadowColor: theme.text, + shadowColor: "#cccc", shadowOffset: { width: 0, height: 0 }, shadowOpacity: 0.125, shadowRadius: 5, @@ -650,12 +655,12 @@ const styles = StyleSheet.create({ position: "absolute", marginTop: Constants.statusBarHeight, flexDirection: "row", - backgroundColor: theme.primaryColor, + backgroundColor: "#ffff", width: "90%", alignSelf: "center", borderRadius: 5, padding: 10, - shadowColor: theme.text, + shadowColor: "#cccc", shadowOffset: { width: 0, height: 3 }, shadowOpacity: 0.5, shadowRadius: 5, @@ -717,7 +722,7 @@ const styles = StyleSheet.create({ textContent: { flex: 2, padding: 10, - color: theme.text, + color: "#cccc", }, cardtitle: { fontSize: 12, diff --git a/package.json b/package.json index 628a2be..dac7c91 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "postinstall": "patch-package" }, "dependencies": { + "@expo/metro-runtime": "~3.2.3", "@gapur/react-native-accordion": "^1.0.7", "@react-native-async-storage/async-storage": "^2.0.0", "@react-native-community/datetimepicker": "8.0.1", @@ -74,6 +75,7 @@ "react-native-uuid": "^2.0.2", "react-native-vector-icons": "^10.1.0", "react-native-video": "^6.2.0", + "react-native-web": "~0.19.10", "react-native-webview": "13.8.6", "react-redux": "^9.1.2", "redux-mock-store": "^1.5.4", diff --git a/yarn.lock b/yarn.lock index 9a4ca86..52ea5b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -943,7 +943,27 @@ dependencies: regenerator-runtime "^0.14.0" +<<<<<<< HEAD "@babel/template@^7.0.0", "@babel/template@^7.24.7", "@babel/template@^7.3.3": +======= +"@babel/runtime@^7.18.6": + version "7.25.6" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2" + integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.0.0", "@babel/template@^7.24.6", "@babel/template@^7.3.3": + version "7.24.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.6.tgz#048c347b2787a6072b24c723664c8d02b67a44f9" + integrity sha512-3vgazJlLwNXi9jhrR1ef8qiB65L1RK90+lEQwv4OxveHnqC3BfmnHdgySwRLzf6akhlOYenT+b7AfWq+a//AHw== + dependencies: + "@babel/code-frame" "^7.24.6" + "@babel/parser" "^7.24.6" + "@babel/types" "^7.24.6" + +"@babel/template@^7.24.7": +>>>>>>> d067872 (new changes for sprint1) version "7.24.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.7.tgz#02efcee317d0609d2c07117cb70ef8fb17ab7315" integrity sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig== @@ -1303,6 +1323,11 @@ postcss "~8.4.32" resolve-from "^5.0.0" +"@expo/metro-runtime@~3.2.3": + version "3.2.3" + resolved "https://registry.yarnpkg.com/@expo/metro-runtime/-/metro-runtime-3.2.3.tgz#e074c28084f30725f8d0d0eeee4fcd6074797d2d" + integrity sha512-v5ji+fAGi7B9YavrxvekuF8gXEV/5fz0+PhaED5AaFDnbGB4IJIbpaiqK9nqZV1axjGZNQSw6Q8TsnFetCR3bQ== + "@expo/osascript@^2.0.31": version "2.1.3" resolved "https://registry.yarnpkg.com/@expo/osascript/-/osascript-2.1.3.tgz#912b74825cb83f3b958cad81034df9e19f1f2808" @@ -2888,12 +2913,16 @@ resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.84.tgz#4764d59775c17a6ed193509cb01ae2f42dd5c045" integrity sha512-Y5W6x8cC5RuakUcTVUFNAIhUZ/tYpuqHZlRBoAuakrTwVuoNHXfQki8lj1KsYU7rW6e3VWgdEx33AfOQpdNp6A== +<<<<<<< HEAD "@react-native/normalize-colors@0.74.85": version "0.74.85" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.85.tgz#62bcb9ab1b10b822ca0278fdfdf23d3b18e125da" integrity sha512-pcE4i0X7y3hsAE0SpIl7t6dUc0B0NZLd1yv7ssm4FrLhWG+CGyIq4eFDXpmPU1XHmL5PPySxTAjEMiwv6tAmOw== "@react-native/normalize-colors@0.74.87": +======= +"@react-native/normalize-colors@^0.74.1": +>>>>>>> d067872 (new changes for sprint1) version "0.74.87" resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.87.tgz#a814169d0ce4ce13ffebcda0a3a5a3f780ccd772" integrity sha512-Xh7Nyk/MPefkb0Itl5Z+3oOobeG9lfLb7ZOY2DKpFnoCE1TzBmib9vMNdFaLdSxLIP+Ec6icgKtdzYg8QUPYzA== @@ -4519,6 +4548,13 @@ css-color-keywords@^1.0.0: resolved "https://registry.yarnpkg.com/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05" integrity sha512-FyyrDHZKEjXDpNJYvVsV960FiqQyXc/LlYmsxl2BcdMb2WPx0OGRVgTg55rPSyLSNMqP52R9r8geSp7apN3Ofg== +css-in-js-utils@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-3.1.0.tgz#640ae6a33646d401fc720c54fc61c42cd76ae2bb" + integrity sha512-fJAcud6B3rRu+KHYk+Bwf+WFL2MDCJJ1XG9x137tJQ0xYxor7XziQtuGFbWNdqrvF4Tk26O3H73nfVqXt/fW1A== + dependencies: + hyphenate-style-name "^1.0.3" + css-select@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/css-select/-/css-select-5.1.0.tgz#b8ebd6554c3637ccc76688804ad3f6a6fdaea8a6" @@ -5516,6 +5552,11 @@ fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.1.0: resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== +fast-loops@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/fast-loops/-/fast-loops-1.1.4.tgz#61bc77d518c0af5073a638c6d9d5c7683f069ce2" + integrity sha512-8dbd3XWoKCTms18ize6JmQF1SFnnfj5s0B7rRry22EofgMu7B6LKHVh+XfFqFGsqnbH54xgeO83PzpKI+ODhlg== + fast-xml-parser@^4.0.12, fast-xml-parser@^4.2.4: version "4.4.0" resolved "https://registry.yarnpkg.com/fast-xml-parser/-/fast-xml-parser-4.4.0.tgz#341cc98de71e9ba9e651a67f41f1752d1441a501" @@ -5556,7 +5597,7 @@ fbjs-css-vars@^1.0.0: resolved "https://registry.yarnpkg.com/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz#216551136ae02fe255932c3ec8775f18e2c078b8" integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== -fbjs@^3.0.0: +fbjs@^3.0.0, fbjs@^3.0.4: version "3.0.5" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-3.0.5.tgz#aa0edb7d5caa6340011790bd9249dbef8a81128d" integrity sha512-ztsSx77JBtkuMrEypfhgc3cI0+0h+svqeie7xHbh1k/IKdcydnvadp/mUaGgjAOXQmQSxsqgaRhS3q9fy+1kxg== @@ -6160,6 +6201,11 @@ human-signals@^2.1.0: resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== +hyphenate-style-name@^1.0.3: + version "1.1.0" + resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.1.0.tgz#1797bf50369588b47b72ca6d5e65374607cf4436" + integrity sha512-WDC/ui2VVRrz3jOVi+XtjqkDjiVjTtFaAGiW37k6b+ohyQ5wYDOGkvCZa8+H0nx3gyvv0+BST9xuOgIyGQ00gw== + iconv-lite@0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.3.tgz#a52f80bf38da1952eb5c681790719871a1a72501" @@ -6238,6 +6284,14 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== +inline-style-prefixer@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-6.0.4.tgz#4290ed453ab0e4441583284ad86e41ad88384f44" + integrity sha512-FwXmZC2zbeeS7NzGjJ6pAiqRhXR0ugUShSNb6GApMl6da0/XGc4MOJsoWAywia52EEWbXNSy0pzkwz/+Y+swSg== + dependencies: + css-in-js-utils "^3.1.0" + fast-loops "^1.1.3" + internal-ip@4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" @@ -7560,6 +7614,11 @@ memoize-one@^5.0.0: resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== +memoize-one@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" + integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== + memory-cache@~0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/memory-cache/-/memory-cache-0.2.0.tgz#7890b01d52c00c8ebc9d533e1f8eb17e3034871a" @@ -8497,7 +8556,7 @@ possible-typed-array-names@^1.0.0: resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz#89bb63c6fada2c3e90adc4a647beeeb39cc7bf8f" integrity sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q== -postcss-value-parser@^4.0.2: +postcss-value-parser@^4.0.2, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== @@ -8896,6 +8955,20 @@ react-native-video@^6.2.0: resolved "https://registry.yarnpkg.com/react-native-video/-/react-native-video-6.5.0.tgz#bcb591eeecc4784438a6f074ea3a456b22d6d1b7" integrity sha512-P3FmyQgKigS4BmFG+6heRHzSp591U/Z+Iw08wWmiNsNiyLRa6x8B0ob4wqWTW4QfzsBf80udg1/T2W49KxxzYw== +react-native-web@~0.19.10: + version "0.19.12" + resolved "https://registry.yarnpkg.com/react-native-web/-/react-native-web-0.19.12.tgz#30d1fd70bdff7886f43c0c2698629d830fade6bc" + integrity sha512-o2T0oztoVDQjztt4YksO9S1XRjoH/AqcSvifgWLrPJgGVbMWsfhILgl6lfUdEamVZzZSVV/2gqDVMAk/qq7mZw== + dependencies: + "@babel/runtime" "^7.18.6" + "@react-native/normalize-colors" "^0.74.1" + fbjs "^3.0.4" + inline-style-prefixer "^6.0.1" + memoize-one "^6.0.0" + nullthrows "^1.1.1" + postcss-value-parser "^4.2.0" + styleq "^0.1.3" + react-native-webview@13.8.6: version "13.8.6" resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.8.6.tgz#5d4a62cb311d5ef8d910a8e112b3f1f2807bcd18" @@ -9743,7 +9816,16 @@ string-length@^5.0.1: char-regex "^2.0.0" strip-ansi "^7.0.1" -"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + +string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -9812,7 +9894,7 @@ stringify-entities@^3.1.0: character-entities-legacy "^1.0.0" xtend "^4.0.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -9826,6 +9908,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.2.0: dependencies: ansi-regex "^4.1.0" +strip-ansi@^6.0.0, strip-ansi@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^7.0.1: version "7.1.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" @@ -9875,6 +9964,11 @@ structured-headers@^0.4.1: resolved "https://registry.yarnpkg.com/structured-headers/-/structured-headers-0.4.1.tgz#77abd9410622c6926261c09b9d16cf10592694d1" integrity sha512-0MP/Cxx5SzeeZ10p/bZI0S6MpgD+yxAhi1BOQ34jgnMXsCq3j1t6tQnZu+KdlL7dvJTLT3g9xN8tl10TqgFMcg== +styleq@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/styleq/-/styleq-0.1.3.tgz#8efb2892debd51ce7b31dc09c227ad920decab71" + integrity sha512-3ZUifmCDCQanjeej1f6kyl/BeP/Vae5EYkQ9iJfUm/QwZvlgnZzyflqAsAWYURdtea8Vkvswu2GrC57h3qffcA== + sucrase@3.34.0: version "3.34.0" resolved "https://registry.yarnpkg.com/sucrase/-/sucrase-3.34.0.tgz#1e0e2d8fcf07f8b9c3569067d92fbd8690fb576f" @@ -10597,7 +10691,7 @@ wonka@^6.3.2: resolved "https://registry.yarnpkg.com/wonka/-/wonka-6.3.4.tgz#76eb9316e3d67d7febf4945202b5bdb2db534594" integrity sha512-CjpbqNtBGNAeyNS/9W6q3kSkKE52+FjIj7AkFlLr11s/VWGUu6a2CdYSdGxocIhIVjaW/zchesBQUKPVU69Cqg== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -10615,6 +10709,15 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" From 465c077887a4d9780eaa62648b97abe484a62a56 Mon Sep 17 00:00:00 2001 From: teamomiamigo Date: Mon, 30 Sep 2024 14:34:31 -0500 Subject: [PATCH 3/3] fix map pins to correct notes --- lib/screens/mapPage/ExploreScreen.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/screens/mapPage/ExploreScreen.js b/lib/screens/mapPage/ExploreScreen.js index 28c1c22..c933dc7 100644 --- a/lib/screens/mapPage/ExploreScreen.js +++ b/lib/screens/mapPage/ExploreScreen.js @@ -36,7 +36,7 @@ const ExploreScreen = () => { const { theme, isDarkmode } = useTheme(); const [showMapTypeOptions, setShowMapTypeOptions] = useState(false); - const styles = createstyles(theme, isDarkmode); + // Add the rest of your component logic here const toggleMapTypeOptions = () => { @@ -150,7 +150,7 @@ const ExploreScreen = () => { useEffect(() => { fetchMessages(); - }, [state, globeIcon, searchResults]); + }, [ globeIcon, searchResults]); @@ -289,6 +289,7 @@ const ExploreScreen = () => { padding: 10, fontSize: 14, fontWeight: "bold", + color: "black", }, selectedMapTypeText: { fontWeight: "bold", @@ -353,7 +354,7 @@ const ExploreScreen = () => { useEffect(() => { mapAnimation.addListener(({ value }) => { - let index = Math.floor(value / CARD_WIDTH + 0.3); // animate 30% away from landing on the next item + let index = Math.floor(value / CARD_WIDTH + 2); // animate 30% away from landing on the next item if (index >= state.markers.length) { index = state.markers.length - 1; } @@ -437,14 +438,12 @@ const ExploreScreen = () => { return { scale }; }); - const onMarkerPress = (mapEventData) => { - const markerID = mapEventData._targetInst.return.key; - + const onMarkerPress = (markerID) => { let x = markerID * CARD_WIDTH + markerID * 20; if (Platform.OS === "ios") { x = x - SPACING_FOR_CARD_INSET; } - + _scrollView.current.scrollTo({ x: x, y: 0, animated: true }); }; @@ -455,7 +454,7 @@ const ExploreScreen = () => { { onMarkerPress(e)} + onPress={() => onMarkerPress(index)} > { ); }; -export default ExploreScreen; - const styles = StyleSheet.create({ container: { flex: 1, @@ -759,3 +756,5 @@ const styles = StyleSheet.create({ fontWeight: "bold", }, }); + +