-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: create component, conditional display, lnurl amount param
- Loading branch information
Showing
4 changed files
with
54 additions
and
29 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,46 @@ | ||
import { View } from "react-native"; | ||
import { Text } from "~/components/ui/text"; | ||
import { Button } from "./ui/button"; | ||
import { router } from "expo-router"; | ||
|
||
function AlbyBanner() { | ||
const showAlbyBanner = new Date().getDate() === 21; | ||
const amounts = [ | ||
{ value: 1000, emoji: '🧡' }, | ||
{ value: 5000, emoji: '🔥' }, | ||
{ value: 10000, emoji: '🚀' } | ||
]; | ||
|
||
if (!showAlbyBanner) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<View className="border bg-card border-muted rounded mt-5 flex flex-col gap-3 p-5"> | ||
<Text className="font-semibold2 text-center">✨ Enjoying Alby Go?</Text> | ||
<Text className="text-muted-foreground text-center">Help us grow and improve by supporting our development.</Text> | ||
<View className="flex flex-row gap-3 mt-3"> | ||
{amounts.map(({ value, emoji }) => ( | ||
<Button | ||
key={value} | ||
variant="secondary" | ||
size="sm" | ||
onPress={() => { | ||
router.navigate({ | ||
pathname: "/send", | ||
params: { | ||
url: "[email protected]", | ||
amount: value | ||
}, | ||
}); | ||
}} | ||
> | ||
<Text>{emoji} {new Intl.NumberFormat().format(value)}</Text> | ||
</Button> | ||
))} | ||
</View> | ||
</View> | ||
); | ||
} | ||
|
||
export default AlbyBanner; |
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 |
---|---|---|
|
@@ -22,6 +22,7 @@ import { SvgProps } from "react-native-svg"; | |
import { Button } from "~/components/ui/button"; | ||
import Screen from "~/components/Screen"; | ||
import { useOnboarding } from "~/hooks/useOnboarding"; | ||
import AlbyBanner from "~/components/AlbyBanner"; | ||
|
||
dayjs.extend(relativeTime); | ||
|
||
|
@@ -123,31 +124,7 @@ export function Home() { | |
)} | ||
</View> | ||
</TouchableOpacity> | ||
{/* <TouchableOpacity className="w-full" onPress={() => { | ||
router.navigate({ | ||
pathname: "/send", | ||
params: { | ||
url: "[email protected]" | ||
}, | ||
}); | ||
}}> | ||
<Button variant="secondary" size="sm"><Text>✨Support Alby Go</Text></Button> | ||
<Card className="w-full mt-5"> | ||
<CardHeader> | ||
<CardTitle>✨ Like Alby Go?</CardTitle> | ||
<CardDescription>Help us grow and improve by supporting our development</CardDescription> | ||
</CardHeader> | ||
</Card> | ||
</TouchableOpacity> */} | ||
<View className="border bg-card border-muted rounded mt-5 flex flex-col gap-3 p-3 "> | ||
<Text className="font-semibold2 text-center">✨ Enjoying Alby Go?</Text> | ||
<Text className="text-muted-foreground text-center">Help us grow and improve by supporting our development</Text> | ||
<View className="flex flex-row gap-3 mt-3"> | ||
<Button variant="secondary" size="sm"><Text>🧡 1000</Text></Button> | ||
<Button variant="secondary" size="sm"><Text>🚀 5000</Text></Button> | ||
<Button variant="secondary" size="sm"><Text>🔥 10000</Text></Button> | ||
</View> | ||
</View> | ||
<AlbyBanner /> | ||
</View> | ||
<View className="flex items-center justify-center"> | ||
<Link href="/transactions" asChild> | ||
|
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