Skip to content

Commit fb9e76b

Browse files
authored
Merge pull request #14781 from LedgerHQ/chore/LIVE-26919/use-lumen-bottom-sheet
LIVE-26919: Use lumen bottom sheet for WV4 Tour
2 parents 88d5307 + 4b5c286 commit fb9e76b

File tree

2 files changed

+46
-35
lines changed

2 files changed

+46
-35
lines changed

.changeset/smart-mangos-joke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"live-mobile": minor
3+
---
4+
5+
chore: use lumen bottom sheet for WV4 Tour

apps/ledger-live-mobile/src/mvvm/features/WalletV4Tour/Drawer/index.tsx

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ import { useSafeAreaInsets } from "react-native-safe-area-context";
44
import Animated from "react-native-reanimated";
55
import { FlatList } from "react-native-gesture-handler";
66
import { useWalletV4TourDrawerViewModel } from "./hooks/useWalletV4TourDrawerViewModel";
7-
import QueuedDrawerGorhom from "LLM/components/QueuedDrawer/temp/QueuedDrawerGorhom";
7+
import { BottomSheetHeader } from "@ledgerhq/lumen-ui-rnative";
8+
import { default as QueuedDrawerBottomSheet } from "LLM/components/QueuedDrawer/QueuedDrawerBottomSheet";
89
import { SlideItem } from "./components/SlideItem";
910
import { SlideFooterButton } from "./components/SlideFooterButton";
10-
import { StyleSheet } from "react-native";
11+
import { StyleSheet, View } from "react-native";
1112
import { ProgressIndicator } from "./components/ProgressIndicator";
1213
import { TrackScreen } from "~/analytics";
1314
import { PAGE_TRACKING_WALLET_V4_TOUR } from "./const";
@@ -37,49 +38,54 @@ export const WalletV4TourDrawer = ({
3738
}
3839

3940
return (
40-
<QueuedDrawerGorhom
41+
<QueuedDrawerBottomSheet
4142
isRequestingToBeOpened={isDrawerOpen}
4243
onClose={closeDrawer}
4344
snapPoints={["92%"]}
44-
noCloseButton={false}
45-
animateOnMount={false}
4645
>
47-
<TrackScreen page={PAGE_TRACKING_WALLET_V4_TOUR} source="Wallet" />
48-
<Slides
49-
bounces={false}
50-
as={AnimatedGestureHandlerFlatList}
51-
testID="walletv4-tour-slides-container"
52-
initialNumToRender={1}
53-
maxToRenderPerBatch={1}
54-
onSlideChange={onSlideChange}
55-
>
56-
<Slides.Content>
57-
{slides.map((slide, index) => (
58-
<Slides.Content.Item key={slide.title + slide.description}>
59-
<SlideItem
60-
title={slide.title}
61-
description={slide.description}
62-
index={index}
63-
lottieSrc={slide.lottieSrc}
64-
speed={slide.speed}
65-
/>
66-
</Slides.Content.Item>
67-
))}
68-
</Slides.Content>
46+
<View style={styles.content}>
47+
<BottomSheetHeader />
48+
<TrackScreen page={PAGE_TRACKING_WALLET_V4_TOUR} source="Wallet" />
49+
<Slides
50+
bounces={false}
51+
as={AnimatedGestureHandlerFlatList}
52+
testID="walletv4-tour-slides-container"
53+
initialNumToRender={1}
54+
maxToRenderPerBatch={1}
55+
onSlideChange={onSlideChange}
56+
>
57+
<Slides.Content>
58+
{slides.map((slide, index) => (
59+
<Slides.Content.Item key={slide.title + slide.description}>
60+
<SlideItem
61+
title={slide.title}
62+
description={slide.description}
63+
index={index}
64+
lottieSrc={slide.lottieSrc}
65+
speed={slide.speed}
66+
/>
67+
</Slides.Content.Item>
68+
))}
69+
</Slides.Content>
6970

70-
<Slides.ProgressIndicator style={styles.progressIndicator}>
71-
<ProgressIndicator />
72-
</Slides.ProgressIndicator>
71+
<Slides.ProgressIndicator style={styles.progressIndicator}>
72+
<ProgressIndicator />
73+
</Slides.ProgressIndicator>
7374

74-
<Slides.Footer style={{ marginBottom: bottomInset + 60 }}>
75-
<SlideFooterButton onClose={handleCloseDrawer} />
76-
</Slides.Footer>
77-
</Slides>
78-
</QueuedDrawerGorhom>
75+
<Slides.Footer style={{ marginBottom: bottomInset + 60 }}>
76+
<SlideFooterButton onClose={handleCloseDrawer} />
77+
</Slides.Footer>
78+
</Slides>
79+
</View>
80+
</QueuedDrawerBottomSheet>
7981
);
8082
};
8183

8284
const styles = StyleSheet.create({
85+
content: {
86+
flex: 1,
87+
paddingHorizontal: 16,
88+
},
8389
progressIndicator: {
8490
marginTop: 40,
8591
marginBottom: 32,

0 commit comments

Comments
 (0)