File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -6,19 +6,16 @@ import { Text } from "~/components/ui/text";
66import { initiatePaymentFlow } from "~/lib/initiatePaymentFlow" ;
77
88export default function Contact ( {
9- key,
109 lnAddress,
1110 name,
1211 onDelete,
1312} : {
14- key : React . Key ;
1513 lnAddress : string ;
1614 name ?: string ;
1715 onDelete ?: ( ) => void ;
1816} ) {
1917 return (
2018 < TouchableOpacity
21- key = { key }
2219 className = "flex flex-row items-center gap-4 px-6 py-4"
2320 onPress = { async ( ) => {
2421 await initiatePaymentFlow ( lnAddress ) ;
Original file line number Diff line number Diff line change @@ -228,11 +228,12 @@ export function Address() {
228228 { filteredAddressBookEntries . length > 0 ? (
229229 < ScrollView className = "flex-1 flex flex-col" >
230230 { filteredAddressBookEntries . map ( ( addressBookEntry , index ) => (
231- < Contact
232- key = { index }
233- name = { addressBookEntry . name }
234- lnAddress = { addressBookEntry . lightningAddress }
235- />
231+ < React . Fragment key = { index } >
232+ < Contact
233+ name = { addressBookEntry . name }
234+ lnAddress = { addressBookEntry . lightningAddress }
235+ />
236+ </ React . Fragment >
236237 ) ) }
237238 </ ScrollView >
238239 ) : (
Original file line number Diff line number Diff line change 1+ import React from "react" ;
12import { ScrollView , View } from "react-native" ;
23import Contact from "~/components/Contact" ;
34import Screen from "~/components/Screen" ;
@@ -13,14 +14,15 @@ export function AddressBook() {
1314 < ScrollView className = "flex-1 flex flex-col mt-4" >
1415 { addressBookEntries . length > 0 ? (
1516 addressBookEntries . map ( ( addressBookEntry , index ) => (
16- < Contact
17- key = { index }
18- name = { addressBookEntry . name }
19- lnAddress = { addressBookEntry . lightningAddress }
20- onDelete = { ( ) => {
21- useAppStore . getState ( ) . removeAddressBookEntry ( index ) ;
22- } }
23- />
17+ < React . Fragment key = { index } >
18+ < Contact
19+ name = { addressBookEntry . name }
20+ lnAddress = { addressBookEntry . lightningAddress }
21+ onDelete = { ( ) => {
22+ useAppStore . getState ( ) . removeAddressBookEntry ( index ) ;
23+ } }
24+ />
25+ </ React . Fragment >
2426 ) )
2527 ) : (
2628 < Text className = "text-lg" > No entries yet.</ Text >
You can’t perform that action at this time.
0 commit comments