forked from erosson/freecbt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.ts
47 lines (45 loc) · 1.49 KB
/
App.ts
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
import { createAppContainer } from "react-navigation";
import { createStackNavigator } from "react-navigation-stack";
import {
CBT_LIST_SCREEN,
CBT_FORM_SCREEN,
EXPLANATION_SCREEN,
SETTING_SCREEN,
CBT_ON_BOARDING_SCREEN,
INIT_SCREEN,
CBT_VIEW_SCREEN,
LOCK_SCREEN,
DEBUG_SCREEN,
} from "./src/screens";
import * as Feature from "./src/feature";
import CBTListScreen from "./src/CBTListScreen";
import CBTFormScreen from "./src/form/FormScreen";
import FinishedThoughtScreen from "./src/form/FinishedThoughtScreen";
import ExplanationScreen from "./src/ExplanationScreen";
import SettingScreen from "./src/SettingsScreen";
import OnboardingScreen from "./src/onboarding/OnboardingScreen";
import withErrorBoundary from "./src/sentry/withErrorBoundary";
import InitScreen from "./src/InitScreen";
import LockScreen from "./src/lock/LockScreen";
import DebugScreen from "./src/DebugScreen";
import Storybook from "./storybook";
const App = createStackNavigator(
{
[INIT_SCREEN]: InitScreen,
[CBT_ON_BOARDING_SCREEN]: OnboardingScreen,
[CBT_LIST_SCREEN]: CBTListScreen,
[CBT_FORM_SCREEN]: CBTFormScreen,
[EXPLANATION_SCREEN]: ExplanationScreen,
[SETTING_SCREEN]: SettingScreen,
[CBT_VIEW_SCREEN]: FinishedThoughtScreen,
[LOCK_SCREEN]: LockScreen,
[DEBUG_SCREEN]: DebugScreen,
},
{
initialRouteName: INIT_SCREEN,
mode: "modal",
}
);
export default process.env.EXPO_STORYBOOK
? Storybook
: withErrorBoundary(Feature.withState(createAppContainer(App)));