Skip to content

Commit 0b3b0fb

Browse files
authored
Merge pull request #408 from getAlby/fix/settings
fix: add scroll view to settings screen
2 parents 6b302bf + f776127 commit 0b3b0fb

File tree

3 files changed

+209
-188
lines changed

3 files changed

+209
-188
lines changed

components/AlbyBanner.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ import { ALBY_LIGHTNING_ADDRESS } from "~/lib/constants";
66
import { initiatePaymentFlow } from "~/lib/initiatePaymentFlow";
77
import { useAppStore } from "~/lib/state/appStore";
88
import { useThemeColor } from "~/lib/useThemeColor";
9+
import { cn } from "~/lib/utils";
910
import { Button } from "./ui/button";
1011

11-
function AlbyBanner() {
12+
function AlbyBanner({ className }: { className?: string }) {
1213
const { shadow } = useThemeColor("shadow");
1314
const lastPayment = useAppStore.getState().getLastAlbyPayment();
1415
const [showBanner, setShowBanner] = useState(
@@ -39,7 +40,10 @@ function AlbyBanner() {
3940

4041
return (
4142
<View
42-
className="bg-background dark:bg-muted rounded-2xl flex flex-col gap-3 p-4 relative mx-2"
43+
className={cn(
44+
"bg-background dark:bg-muted rounded-2xl flex flex-col gap-3 p-4 relative",
45+
className,
46+
)}
4347
style={{
4448
...Platform.select({
4549
// make sure bg color is applied to avoid RCTView errors

pages/Home.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ export function Home() {
136136
showsVerticalScrollIndicator={false}
137137
contentContainerClassName="flex-1 px-6"
138138
>
139-
<View className="flex-1 justify-center gap-8">
139+
<View className="flex-1 justify-center gap-4 sm:gap-8">
140140
<View className="flex items-center justify-center gap-2">
141141
{wallets.length > 1 && (
142142
<TouchableOpacity
@@ -243,7 +243,7 @@ export function Home() {
243243
)}
244244
</TouchableOpacity>
245245
</View>
246-
{new Date().getDate() === 21 && <AlbyBanner />}
246+
{new Date().getDate() !== 21 && <AlbyBanner />}
247247
</View>
248248
</ScrollView>
249249
<View className="flex items-center justify-center">

0 commit comments

Comments
 (0)