MCPcopy Index your code
hub / github.com/Expensify/App / ProactiveAppReviewModal

Function ProactiveAppReviewModal

src/components/ProactiveAppReviewModal.tsx:27–75  ·  view source on GitHub ↗
({isVisible, onPositive, onNegative, onSkip}: ProactiveAppReviewModalProps)

Source from the content-addressed store, hash-verified

25};
26
27function ProactiveAppReviewModal({isVisible, onPositive, onNegative, onSkip}: ProactiveAppReviewModalProps) {
28 const {shouldUseNarrowLayout} = useResponsiveLayout();
29 const styles = useThemeStyles();
30 const illustrations = useMemoizedLazyIllustrations(['ToddWithPhones']);
31 const {translate} = useLocalize();
32
33 return (
34 <Modal
35 onClose={onSkip}
36 isVisible={isVisible}
37 type={shouldUseNarrowLayout ? CONST.MODAL.MODAL_TYPE.BOTTOM_DOCKED : CONST.MODAL.MODAL_TYPE.CONFIRM}
38 innerContainerStyle={styles.pv0}
39 >
40 <View style={[styles.m5]}>
41 {/* Todd with phones illustration */}
42 <View style={[styles.alignItemsCenter, styles.mb3]}>
43 <ImageSVG
44 src={illustrations.ToddWithPhones}
45 contentFit="contain"
46 width={200}
47 height={200}
48 />
49 </View>
50
51 {/* Title and prompt */}
52 <View>
53 <Text style={[styles.textHeadlineH1, styles.textAlignCenter, styles.mb3]}>{translate('proactiveAppReview.title')}</Text>
54 <Text style={[styles.textAlignCenter, styles.textSupporting]}>{translate('proactiveAppReview.description')}</Text>
55 </View>
56
57 {/* Buttons */}
58 <Button
59 success
60 style={[styles.mt5]}
61 onPress={onPositive}
62 pressOnEnter
63 text={translate('proactiveAppReview.positiveButton')}
64 large
65 />
66 <Button
67 style={[styles.mt3, styles.noSelect]}
68 onPress={onNegative}
69 text={translate('proactiveAppReview.negativeButton')}
70 large
71 />
72 </View>
73 </Modal>
74 );
75}
76
77export default ProactiveAppReviewModal;

Callers

nothing calls this directly

Calls 5

useThemeStylesFunction · 0.85
useLocalizeFunction · 0.85
translateFunction · 0.70
useResponsiveLayoutFunction · 0.50

Tested by

no test coverage detected