Skip to content
This repository was archived by the owner on Aug 30, 2025. It is now read-only.

Commit e49f359

Browse files
committed
fix: ajustement de la taille de NativeList et mise à jour des styles de QR-code
1 parent a54d9fd commit e49f359

File tree

2 files changed

+46
-35
lines changed

2 files changed

+46
-35
lines changed

src/views/account/Restaurant/Modals/CardDetail.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -296,30 +296,31 @@ const RestaurantCardDetail: Screen<"RestaurantCardDetail"> = ({ route, navigatio
296296
weight="light"
297297
activeScale={0.95}
298298
>
299-
<NativeList inline style={{ width: 100, height: 76 }}>
299+
<NativeList inline style={{ width: 120, height: 76 }}>
300300
<View
301301
style={{
302302
height: 76,
303303
gap: 6,
304304
flexDirection: "column",
305305
alignItems: "center",
306-
justifyContent: "center"
306+
justifyContent: "center",
307+
backgroundColor: route.params.card.theme.colors.background ?? theme.colors.primary,
307308
}}
308309
>
309310
<QrCode
310311
size={24}
311312
strokeWidth={2.2}
312-
color={theme.colors.text}
313+
color={"#fff"}
313314
/>
314315
<Text
315316
style={{
316317
fontFamily: "semibold",
317318
fontSize: 13,
318-
color: theme.colors.text,
319+
color: "#fff",
319320
textAlign: "center",
320321
}}
321322
>
322-
QR-code
323+
Payer un repas
323324
</Text>
324325
</View>
325326
</NativeList>

src/views/account/Restaurant/Modals/QrCode.tsx

Lines changed: 40 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import { Screen } from "@/router/helpers/types";
1313
import { ExternalAccount } from "@/stores/account/types";
1414
import useSoundHapticsWrapper from "@/utils/native/playSoundHaptics";
1515
import * as Brightness from "expo-brightness";
16+
import Reanimated, { ZoomIn } from "react-native-reanimated";
17+
import { anim2Papillon } from "@/utils/ui/animations";
1618

1719
const RestaurantQrCode: Screen<"RestaurantQrCode"> = ({ route, navigation }) => {
1820
const { card } = route.params;
@@ -123,7 +125,7 @@ const RestaurantQrCode: Screen<"RestaurantQrCode"> = ({ route, navigation }) =>
123125
}}
124126
onPress={() => navigation.goBack()}
125127
>
126-
<View
128+
<Reanimated.View
127129
style={{
128130
marginBottom: 32,
129131
justifyContent: "center",
@@ -148,42 +150,50 @@ const RestaurantQrCode: Screen<"RestaurantQrCode"> = ({ route, navigation }) =>
148150
>
149151
Approche le code QR du scanner de la borne afin de valider ta carte
150152
</Text>
151-
</View>
153+
</Reanimated.View>
152154
</Pressable>
153155

154156
{qrCode && (
155-
<PressableScale
156-
style={{
157-
padding: 16,
158-
backgroundColor: "white",
157+
<Reanimated.View
158+
entering={anim2Papillon(ZoomIn)}
159+
>
160+
<PressableScale
161+
style={{
162+
padding: 16,
163+
backgroundColor: "white",
159164

160-
borderColor: theme.colors.text + "40",
161-
borderWidth: 1,
165+
borderColor: theme.colors.text + "40",
166+
borderWidth: 1,
162167

163-
shadowColor: "#000",
164-
shadowOffset: {
165-
width: 0,
166-
height: 2,
167-
},
168-
shadowOpacity: 0.2,
169-
shadowRadius: 7,
168+
shadowColor: "#000",
169+
shadowOffset: {
170+
width: 0,
171+
height: 2,
172+
},
173+
shadowOpacity: 0.2,
174+
shadowRadius: 7,
170175

171-
elevation: 5,
176+
elevation: 5,
172177

173-
borderRadius: 16,
174-
borderCurve: "continuous",
175-
}}
176-
onPress={() => {
177-
GenerateQRCode();
178-
}}
179-
weight="light"
180-
activeScale={0.9}
181-
>
182-
<QRCode
183-
value={qrCode}
184-
size={280}
185-
/>
186-
</PressableScale>
178+
borderRadius: 16,
179+
borderCurve: "continuous",
180+
}}
181+
onPress={() => {
182+
GenerateQRCode();
183+
}}
184+
weight="light"
185+
activeScale={0.9}
186+
>
187+
<Reanimated.View
188+
entering={anim2Papillon(ZoomIn).delay(100)}
189+
>
190+
<QRCode
191+
value={qrCode}
192+
size={280}
193+
/>
194+
</Reanimated.View>
195+
</PressableScale>
196+
</Reanimated.View>
187197
)}
188198

189199
<Pressable

0 commit comments

Comments
 (0)