-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(wallet-mobile): Add dApp Explorer feature flag and rename variables #3190
Changes from 10 commits
cc7fbd1
28df713
67766ae
3336317
0c25793
07cf468
77b74ee
596a200
e14dc02
69eb45d
cc84779
ae872b5
0707efc
acdf912
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,24 +1,18 @@ | ||||
import {NavigationProp, useNavigation} from '@react-navigation/native' | ||||
import {useRef} from 'react' | ||||
import * as React from 'react' | ||||
|
||||
import {DiscoverRoutes} from '../../../navigation' | ||||
|
||||
export const useNavigateTo = () => { | ||||
const navigation = useNavigation<NavigationProp<DiscoverRoutes>>() | ||||
|
||||
return useRef({ | ||||
return React.useRef({ | ||||
goBack: () => navigation.goBack(), | ||||
browserSearch: (isEdit = false) => { | ||||
return navigation.navigate('browser', { | ||||
screen: 'browser-search', | ||||
params: {isEdit}, | ||||
}) | ||||
searchDappInBrowser: ({isEdit = false} = {}) => { | ||||
return navigation.navigate('discover-browser', {screen: 'discover-search-dapp-in-browser', params: {isEdit}}) | ||||
}, | ||||
discover: () => navigation.navigate('discover-list'), | ||||
browserView: () => | ||||
navigation.navigate('browser', { | ||||
screen: 'browser-view', | ||||
}), | ||||
selectDappFromList: () => navigation.navigate('discover-select-dapp-from-list'), | ||||
browseDapp: () => navigation.navigate('discover-browser', {screen: 'discover-browse-dapp'}), | ||||
navigation: () => navigation, | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this should be deleted. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||
}).current | ||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@michaeljscript this is looking confusing and with a lot of var shadowing, can you give it a look?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated