-
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.
- Loading branch information
Showing
5 changed files
with
37 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import { View } from "react-native"; | ||
import { Text } from "~/components/ui/text"; | ||
|
||
interface ReceiverProps { | ||
originalText: string; | ||
invoice?: string; | ||
} | ||
|
||
export function Receiver({ originalText, invoice }: ReceiverProps) { | ||
const shouldShowReceiver = | ||
originalText !== invoice && | ||
originalText.toLowerCase().replace("lightning:", "").includes("@"); | ||
|
||
if (!shouldShowReceiver) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<View className="flex flex-col gap-2"> | ||
<Text className="text-muted-foreground text-center font-semibold2"> | ||
To | ||
</Text> | ||
<Text className="text-center text-foreground text-2xl font-medium2"> | ||
{originalText.toLowerCase().replace("lightning:", "")} | ||
</Text> | ||
</View> | ||
); | ||
} |
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