2
2
Stacks ,
3
3
Screens ,
4
4
AgentProvider ,
5
+ AnimatedComponentsProvider ,
6
+ animatedComponents ,
5
7
TourProvider ,
6
8
AuthProvider ,
7
9
toastConfig ,
@@ -18,7 +20,9 @@ import {
18
20
ContainerProvider ,
19
21
MainContainer ,
20
22
} from '@hyperledger/aries-bifold-core'
23
+ import { RootStackParams } from '@hyperledger/aries-bifold-core/lib/typescript/App/types/navigators'
21
24
import { useNavigation } from '@react-navigation/native'
25
+ import { StackNavigationProp } from '@react-navigation/stack'
22
26
import React , { useEffect , useState , useMemo } from 'react'
23
27
import { useTranslation } from 'react-i18next'
24
28
import { Linking , StatusBar } from 'react-native'
@@ -51,7 +55,7 @@ const App = () => {
51
55
} , [ ] )
52
56
const [ surveyVisible , setSurveyVisible ] = useState ( false )
53
57
const { t } = useTranslation ( )
54
- const { navigate } = useNavigation ( )
58
+ const { navigate } = useNavigation < StackNavigationProp < RootStackParams > > ( )
55
59
const toggleSurveyVisibility = ( ) => setSurveyVisible ( ! surveyVisible )
56
60
57
61
const helpLink = 'https://www2.gov.bc.ca/gov/content/governments/government-id/bc-wallet/help'
@@ -97,13 +101,13 @@ const App = () => {
97
101
title : t ( 'Settings.TermsOfUse' ) ,
98
102
accessibilityLabel : t ( 'Settings.TermsOfUse' ) ,
99
103
testID : testIdWithKey ( 'TermsOfUse' ) ,
100
- onPress : ( ) => navigate ( Stacks . SettingStack as never , { screen : Screens . Terms } as never ) ,
104
+ onPress : ( ) => navigate ( Stacks . SettingStack , { screen : Screens . Terms } ) ,
101
105
} ,
102
106
{
103
107
title : t ( 'Settings.IntroductionToTheApp' ) ,
104
108
accessibilityLabel : t ( 'Settings.IntroductionToTheApp' ) ,
105
109
testID : testIdWithKey ( 'IntroductionToTheApp' ) ,
106
- onPress : ( ) => navigate ( Stacks . SettingStack as never , { screen : Screens . Onboarding } as never ) ,
110
+ onPress : ( ) => navigate ( Stacks . SettingStack , { screen : Screens . Onboarding } ) ,
107
111
} ,
108
112
{
109
113
title : t ( 'Settings.PlayWithBCWallet' ) ,
@@ -128,37 +132,39 @@ const App = () => {
128
132
< StoreProvider initialState = { initialState } reducer = { reducer } >
129
133
< AgentProvider agent = { undefined } >
130
134
< ThemeProvider value = { theme } >
131
- < ConfigurationProvider value = { configuration } >
132
- < AuthProvider >
133
- < NetworkProvider >
134
- < StatusBar
135
- barStyle = "light-content"
136
- hidden = { false }
137
- backgroundColor = { theme . ColorPallet . brand . primary }
138
- translucent = { false }
139
- />
140
- < NetInfo />
141
- < ErrorModal />
142
- < WebDisplay
143
- destinationUrl = { surveyMonkeyUrl }
144
- exitUrl = { surveyMonkeyExitUrl }
145
- visible = { surveyVisible }
146
- onClose = { toggleSurveyVisibility }
147
- />
148
- < TourProvider
149
- homeTourSteps = { homeTourSteps }
150
- credentialsTourSteps = { credentialsTourSteps }
151
- credentialOfferTourSteps = { credentialOfferTourSteps }
152
- proofRequestTourSteps = { proofRequestTourSteps }
153
- overlayColor = { 'black' }
154
- overlayOpacity = { 0.7 }
155
- >
156
- < RootStack />
157
- </ TourProvider >
158
- < Toast topOffset = { 15 } config = { toastConfig } />
159
- </ NetworkProvider >
160
- </ AuthProvider >
161
- </ ConfigurationProvider >
135
+ < AnimatedComponentsProvider value = { animatedComponents } >
136
+ < ConfigurationProvider value = { configuration } >
137
+ < AuthProvider >
138
+ < NetworkProvider >
139
+ < StatusBar
140
+ barStyle = "light-content"
141
+ hidden = { false }
142
+ backgroundColor = { theme . ColorPallet . brand . primary }
143
+ translucent = { false }
144
+ />
145
+ < NetInfo />
146
+ < ErrorModal />
147
+ < WebDisplay
148
+ destinationUrl = { surveyMonkeyUrl }
149
+ exitUrl = { surveyMonkeyExitUrl }
150
+ visible = { surveyVisible }
151
+ onClose = { toggleSurveyVisibility }
152
+ />
153
+ < TourProvider
154
+ homeTourSteps = { homeTourSteps }
155
+ credentialsTourSteps = { credentialsTourSteps }
156
+ credentialOfferTourSteps = { credentialOfferTourSteps }
157
+ proofRequestTourSteps = { proofRequestTourSteps }
158
+ overlayColor = { 'black' }
159
+ overlayOpacity = { 0.7 }
160
+ >
161
+ < RootStack />
162
+ </ TourProvider >
163
+ < Toast topOffset = { 15 } config = { toastConfig } />
164
+ </ NetworkProvider >
165
+ </ AuthProvider >
166
+ </ ConfigurationProvider >
167
+ </ AnimatedComponentsProvider >
162
168
</ ThemeProvider >
163
169
</ AgentProvider >
164
170
</ StoreProvider >
0 commit comments