Skip to content

Commit 7eeb1f8

Browse files
authored
Merge pull request #430 from getAlby/fix/qr-codes
fix: force qr code colors to light theme
2 parents d4dbc19 + 7ad9a13 commit 7eeb1f8

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

components/QRCode.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { LinearGradient } from "components/LinearGradient";
22
import { Dimensions, View } from "react-native";
33
import QRCodeStyled from "react-native-qrcode-styled";
44
import AlbyGoLogomark from "~/components/AlbyGoLogomark";
5+
import { THEME_COLORS } from "~/lib/constants";
56
import { useThemeColor } from "~/lib/useThemeColor";
67

78
function QRCode({
@@ -11,11 +12,8 @@ function QRCode({
1112
value: string;
1213
showAvatar?: boolean;
1314
}) {
14-
const { primary, secondary, foreground } = useThemeColor(
15-
"primary",
16-
"secondary",
17-
"foreground",
18-
);
15+
const { primary, secondary } = useThemeColor("primary", "secondary");
16+
const { background, foreground } = THEME_COLORS.light;
1917
const dimensions = Dimensions.get("window");
2018
const qrSize = Math.round((dimensions.width * 5) / 7);
2119
const avatarSize = qrSize * 0.15;
@@ -28,7 +26,10 @@ function QRCode({
2826
start={[0, 1]}
2927
end={[1, 0]}
3028
>
31-
<View className="flex items-center justify-center p-4 rounded-3xl bg-background">
29+
<View
30+
className="flex items-center justify-center p-4 rounded-3xl"
31+
style={{ backgroundColor: background }}
32+
>
3233
<QRCodeStyled
3334
data={value}
3435
size={qrSize}

0 commit comments

Comments
 (0)