(path: string)
| 35 | import type { UIExplorerAction } from './UIExplorerActions'; |
| 36 | |
| 37 | function PathActionMap(path: string): ?UIExplorerAction { |
| 38 | // Warning! Hacky parsing for example code. Use a library for this! |
| 39 | const exampleParts = path.split('/example/'); |
| 40 | const exampleKey = exampleParts[1]; |
| 41 | if (exampleKey) { |
| 42 | if (!UIExplorerList.Modules[exampleKey]) { |
| 43 | Alert.alert(`${exampleKey} example could not be found!`); |
| 44 | return null; |
| 45 | } |
| 46 | return UIExplorerActions.ExampleAction(exampleKey); |
| 47 | } |
| 48 | return null; |
| 49 | } |
| 50 | |
| 51 | function URIActionMap(uri: ?string): ?UIExplorerAction { |
| 52 | if (!uri) { |
no test coverage detected
searching dependent graphs…