-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
83 lines (78 loc) · 2.4 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* NO NEED TO CHANGE THIS FILE */
import React from "react";
import { Button, View } from "react-native";
import Tutorial from "./src/modules/screens/tutorial/Tutorial";
import { Provider, useDispatch } from "react-redux";
import { store } from "./src/modules/store/store";
/**
* Simple wrapper for setting up the app and providing a button to open the modal
*/
export default function App() {
return (
<Provider store={store}>
<Home />
</Provider>
);
}
const Home = () => {
const dispatch = useDispatch();
const handleOpenTutorial = () => {
dispatch({ type: "OPEN_TUTORIAL" });
};
return (
<>
<View
style={{
position: "absolute",
left: 0,
bottom: 0,
right: 0,
top: 0,
justifyContent: "center",
alignItems: "center",
}}
>
<Button title="Open Tutorial" onPress={handleOpenTutorial} />
</View>
<Tutorial
onFirstTutorialSlideNextAction={() => {}}
onPrompt={(_a, _b, _c) => {}}
tutorialSlides={[
{
backgroundColor: "#FFFDDD",
buttonLabel: "First",
description: "The first slide",
image1xUrl: "https://via.placeholder.com/300.png",
image2xUrl: "https://via.placeholder.com/300.png",
image3xUrl: "https://via.placeholder.com/300.png",
name: "first",
promptForLocationAccess: true,
promptForPushNotifications: true,
},
{
backgroundColor: "#FFF",
buttonLabel: "Second",
description: "The second slide",
image1xUrl: "https://via.placeholder.com/300.png",
image2xUrl: "https://via.placeholder.com/300.png",
image3xUrl: "https://via.placeholder.com/300.png",
name: "second",
promptForLocationAccess: true,
promptForPushNotifications: true,
},
{
backgroundColor: "#DDDFFF",
buttonLabel: "Third",
description: "The third slide",
image1xUrl: "https://via.placeholder.com/300.png",
image2xUrl: "https://via.placeholder.com/300.png",
image3xUrl: "https://via.placeholder.com/300.png",
name: "third",
promptForLocationAccess: true,
promptForPushNotifications: true,
},
]}
/>
</>
);
};