repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 2.17 kB
JSON
{"ast":null,"code":"\"use strict\";\n\nimport * as React from 'react';\nimport { CurrentRenderContext } from \"./CurrentRenderContext.js\";\nexport function useCurrentRender({\n state,\n navigation,\n descriptors\n}) {\n const current = React.useContext(CurrentRenderContext);\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}","map":{"version":3,"names":["React","CurrentRenderContext","useCurrentRender","state","navigation","descriptors","current","useContext","isFocused","options","routes","index","key"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/@react-navigation/core/src/useCurrentRender.tsx"],"sourcesContent":["import type { NavigationState, ParamListBase } from '@react-navigation/routers';\nimport * as React from 'react';\n\nimport { CurrentRenderContext } from './CurrentRenderContext';\nimport type {\n Descriptor,\n NavigationHelpers,\n NavigationProp,\n RouteProp,\n} from './types';\n\ntype Options = {\n state: NavigationState;\n navigation: NavigationHelpers<ParamListBase>;\n descriptors: Record<\n string,\n Descriptor<object, NavigationProp<ParamListBase>, RouteProp<ParamListBase>>\n >;\n};\n\n/**\n * Write the current options, so that server renderer can get current values\n * Mutating values like this is not safe in async mode, but it doesn't apply to SSR\n */\nexport function useCurrentRender({ state, navigation, descriptors }: Options) {\n const current = React.useContext(CurrentRenderContext);\n\n if (current && navigation.isFocused()) {\n current.options = descriptors[state.routes[state.index].key].options;\n }\n}\n"],"mappings":";;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,oBAAoB;AAqB7B,OAAO,SAASC,gBAAgBA,CAAC;EAAEC,KAAK;EAAEC,UAAU;EAAEC;AAAqB,CAAC,EAAE;EAC5E,MAAMC,OAAO,GAAGN,KAAK,CAACO,UAAU,CAACN,oBAAoB,CAAC;EAEtD,IAAIK,OAAO,IAAIF,UAAU,CAACI,SAAS,CAAC,CAAC,EAAE;IACrCF,OAAO,CAACG,OAAO,GAAGJ,WAAW,CAACF,KAAK,CAACO,MAAM,CAACP,KAAK,CAACQ,KAAK,CAAC,CAACC,GAAG,CAAC,CAACH,OAAO;EACtE;AACF","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}