-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from getAlby/feat/address-book
feat: address book
- Loading branch information
Showing
30 changed files
with
285 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { AddressBook } from "../../pages/send/AddressBook"; | ||
|
||
export default function Page() { | ||
return <AddressBook />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { NewAddressBookEntry } from "../../../pages/settings/address-book/NewAddressBookEntry"; | ||
|
||
export default function Page() { | ||
return <NewAddressBookEntry />; | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningAddress } from "../../../../pages/settings/wallets/LightningAddress"; | ||
|
||
export default function Page() { | ||
return <LightningAddress />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { WalletConnection } from "../../../../pages/settings/wallets/WalletConnection"; | ||
|
||
export default function Page() { | ||
return <WalletConnection />; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { Link, Stack, router } from "expo-router"; | ||
import { Pressable, View } from "react-native"; | ||
import { PlusCircle } from "~/components/Icons"; | ||
|
||
import { | ||
Card, | ||
CardDescription, | ||
CardHeader, | ||
CardTitle, | ||
} from "~/components/ui/card"; | ||
import { Text } from "~/components/ui/text"; | ||
import { useAppStore } from "~/lib/state/appStore"; | ||
|
||
export function AddressBook() { | ||
const addressBookEntries = useAppStore((store) => store.addressBookEntries); | ||
return ( | ||
<View className="flex-1 flex flex-col p-3 gap-3"> | ||
<Stack.Screen | ||
options={{ | ||
title: "Address Book", | ||
}} | ||
/> | ||
{addressBookEntries.map((addressBookEntry, index) => ( | ||
<Pressable | ||
key={index} | ||
onPress={() => { | ||
router.dismissAll(); | ||
router.navigate({ | ||
pathname: "/send", | ||
params: { | ||
url: addressBookEntry.lightningAddress, | ||
}, | ||
}); | ||
}} | ||
> | ||
<Card className="w-full"> | ||
<CardHeader className="w-full"> | ||
<CardTitle> | ||
{addressBookEntry.name || addressBookEntry.lightningAddress} | ||
</CardTitle> | ||
<CardDescription> | ||
{addressBookEntry.lightningAddress} | ||
</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
</Pressable> | ||
))} | ||
<Link href="/settings/address-book/new" asChild> | ||
<Pressable> | ||
<Card className="w-full"> | ||
<CardHeader className="w-full"> | ||
<View className="flex flex-row items-center gap-2"> | ||
<PlusCircle className="text-primary" /> | ||
<Text className="font-bold">Add Address</Text> | ||
</View> | ||
</CardHeader> | ||
</Card> | ||
</Pressable> | ||
</Link> | ||
</View> | ||
); | ||
} |
Oops, something went wrong.