-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
645 changed files
with
39,603 additions
and
16,412 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,6 @@ BUILD_VARIANT=PROD | |
SENTRY_DSN=https://[email protected]/6783228 | ||
|
||
FRONTEND_FEE_ADDRESS_MAINNET=addr1q9ry6jfdgm0lcrtfpgwrgxg7qfahv80jlghhrthy6w8hmyjuw9ngccy937pm7yw0jjnxasm7hzxjrf8rzkqcj26788lqws5fke | ||
FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km | ||
FRONTEND_FEE_ADDRESS_PREPROD=addr_test1qrgpjmyy8zk9nuza24a0f4e7mgp9gd6h3uayp0rqnjnkl54v4dlyj0kwfs0x4e38a7047lymzp37tx0y42glslcdtzhqzp57km | ||
|
||
UNSTOPPABLE_API_KEY=czsajliz-wxgu6tujd1zqq7hey_pclfqhdjsqolsxjfsurgh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,16 @@ | ||
import React from 'react' | ||
import {NavigationContext, NavigationProp, NavigationRouteContext, RouteProp} from '@react-navigation/native' | ||
import {action} from '@storybook/addon-actions' | ||
|
||
import {StackNavigationProp} from '@react-navigation/stack' | ||
import {BottomTabNavigationProp} from '@react-navigation/bottom-tabs' | ||
|
||
export const navigation = { | ||
setParams: action('setParams'), | ||
setOptions: action('setOptions'), | ||
|
||
// NavigationHelpers | ||
dispatch: action('dispatch'), | ||
navigate: action('navigate'), | ||
reset: action('reset'), | ||
goBack: action('goBack'), | ||
isFocused: (...args) => { | ||
action('isFocused') | ||
|
||
return true | ||
}, | ||
canGoBack: (...args) => { | ||
action('canGoBack') | ||
|
||
return true | ||
}, | ||
|
||
// EventConsumer | ||
addListener: (event: string) => { | ||
action('addListener')(event) | ||
|
||
return () => action('unsubscribe')(event) | ||
}, | ||
removeListener: action('removeListener'), | ||
} | ||
|
||
export const stackNavigation: Partial<StackNavigationProp<any>> = { | ||
...navigation, | ||
replace: action('replace'), | ||
push: action('push'), | ||
pop: action('pop'), | ||
popToTop: action('popToTop'), | ||
} | ||
|
||
export const tabNavigation: Partial<BottomTabNavigationProp<any>> = { | ||
...navigation, | ||
jumpTo: action('jumpTo'), | ||
} | ||
|
||
export const CommonNavigationProvider = ({children}: {children: React.ReactNode}) => ( | ||
<NavigationContext.Provider value={navigation as any}>{children}</NavigationContext.Provider> | ||
) | ||
|
||
export const StackNavigationProvider = ({children}: {children: React.ReactNode}) => ( | ||
<NavigationContext.Provider value={stackNavigation as NavigationProp<any>}>{children}</NavigationContext.Provider> | ||
) | ||
|
||
export const TabNavigationProvider = ({children}: {children: React.ReactNode}) => ( | ||
<NavigationContext.Provider value={tabNavigation as NavigationProp<any>}>{children}</NavigationContext.Provider> | ||
) | ||
import {NavigationRouteContext} from '@react-navigation/native' | ||
|
||
const route = { | ||
key: 'route.key', | ||
name: 'route.name', | ||
} | ||
|
||
export const RouteProvider: React.FC<React.PropsWithChildren<{params?: Record<string, unknown>}>> = ({children, params}) => ( | ||
export const RouteProvider: React.FC<React.PropsWithChildren<{params?: Record<string, unknown>}>> = ({ | ||
children, | ||
params, | ||
}) => ( | ||
<NavigationRouteContext.Provider value={params ? {...route, params} : route}> | ||
{children} | ||
</NavigationRouteContext.Provider> | ||
) | ||
|
||
export const withCommonNavigation = (storyFn) => ( | ||
<CommonNavigationProvider> | ||
<RouteProvider>{storyFn({navigation, route})}</RouteProvider> | ||
</CommonNavigationProvider> | ||
) |
Oops, something went wrong.