diff --git a/nr-app/app/(tabs)/list.tsx b/nr-app/app/(tabs)/list.tsx index 91c6e6b..58c5eb1 100644 --- a/nr-app/app/(tabs)/list.tsx +++ b/nr-app/app/(tabs)/list.tsx @@ -68,6 +68,6 @@ const styles = StyleSheet.create({ gap: 8, }, note: { - color: "#008800" - } + color: "#008800", + }, }); diff --git a/nr-app/app/(tabs)/settings.tsx b/nr-app/app/(tabs)/settings.tsx index a092b6e..ed3a024 100644 --- a/nr-app/app/(tabs)/settings.tsx +++ b/nr-app/app/(tabs)/settings.tsx @@ -6,25 +6,13 @@ export default function TabThreeScreen() { Keys npub - + nsec - + seed - + Relays - + Help Copy and adapt some text from notes.trustroots.org @@ -44,9 +32,9 @@ const styles = StyleSheet.create({ borderBottomWidth: 1, // Optional: add a bottom border borderBottomColor: "#ddd", // Optional: color of the bottom border }, - input: { + input: { height: 40, - borderColor: 'gray', + borderColor: "gray", borderWidth: 1, marginBottom: 20, paddingHorizontal: 10, diff --git a/nr-app/src/components/Map.tsx b/nr-app/src/components/Map.tsx index abb581e..b8539c9 100644 --- a/nr-app/src/components/Map.tsx +++ b/nr-app/src/components/Map.tsx @@ -9,6 +9,9 @@ import MapView, { Marker, Callout } from "react-native-maps"; import { eventsSelectors } from "@/redux/slices/events.slice"; import { useAppSelector } from "@/redux/hooks"; +import React, { useState } from "react"; +import { Modal, TextInput, Button } from "react-native"; + const NoteMarker = ({ event }) => { if (Array.isArray(event.event.tags[1]) && event.event.tags[1][1]) { const coordinates = plusCodeToCoordinates(event.event.tags[1][1]); @@ -31,12 +34,28 @@ const NoteMarker = ({ event }) => { export default function Map() { const events = useAppSelector(eventsSelectors.selectAll); + const handleAddNote = () => { + // Logic to add the note to the event or state + console.log("Note added:", note, "at", selectedCoordinate); + setModalVisible(false); + setNote(""); + }; + + const [modalVisible, setModalVisible] = useState(false); + const [note, setNote] = useState(""); + const [selectedCoordinate, setSelectedCoordinate] = useState(null); + const handleLongPress = (event) => { + setSelectedCoordinate(event.nativeEvent.coordinate); + setModalVisible(true); + }; + return ( { console.log("#rIMmxg Map move completed", region, details); const topRightCoordinates = { @@ -62,6 +81,32 @@ export default function Map() { ))} + + setModalVisible(false)} + > + + +