0a9cb29bc0fc5bc26bb567811ff000c4.json
2.9 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require(\"@babel/runtime/helpers/classCallCheck\"));var _createClass2=_interopRequireDefault(require(\"@babel/runtime/helpers/createClass\"));var _possibleConstructorReturn2=_interopRequireDefault(require(\"@babel/runtime/helpers/possibleConstructorReturn\"));var _getPrototypeOf2=_interopRequireDefault(require(\"@babel/runtime/helpers/getPrototypeOf\"));var _inherits2=_interopRequireDefault(require(\"@babel/runtime/helpers/inherits\"));var _react=_interopRequireDefault(require(\"react\"));var _SceneView=_interopRequireDefault(require(\"../SceneView\"));var _jsxFileName=\"/Users/satya/Workspace/Callstack/react-navigation-core/src/views/SwitchView/SwitchView.js\";var SwitchView=function(_React$Component){(0,_inherits2.default)(SwitchView,_React$Component);function SwitchView(){(0,_classCallCheck2.default)(this,SwitchView);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(SwitchView).apply(this,arguments));}(0,_createClass2.default)(SwitchView,[{key:\"render\",value:function render(){var state=this.props.navigation.state;var activeKey=state.routes[state.index].key;var descriptor=this.props.descriptors[activeKey];var ChildComponent=descriptor.getComponent();return _react.default.createElement(_SceneView.default,{component:ChildComponent,navigation:descriptor.navigation,screenProps:this.props.screenProps,__source:{fileName:_jsxFileName,lineNumber:12}});}}]);return SwitchView;}(_react.default.Component);exports.default=SwitchView;","map":{"version":3,"sources":["SwitchView.js"],"names":["SwitchView","React","state","activeKey","descriptor","ChildComponent"],"mappings":"6nBAAA,oDACA,+D,6GAEqBA,GAAAA,CAAAA,U,mVACV,CAAA,GACCE,CAAAA,KADD,CACW,KAAA,KAAA,CADX,UACW,CADX,KAAA,CAEP,GAAMC,CAAAA,SAAS,CAAGD,KAAK,CAALA,MAAAA,CAAaA,KAAK,CAAlBA,KAAAA,EAAlB,GAAA,CACA,GAAME,CAAAA,UAAU,CAAG,KAAA,KAAA,CAAA,WAAA,CAAnB,SAAmB,CAAnB,CACA,GAAMC,CAAAA,cAAc,CAAGD,UAAU,CAAjC,YAAuBA,EAAvB,CAEA,MACE,gBAAA,aAAA,CAAA,kBAAA,CAAA,CACE,SAAS,CADX,cAAA,CAEE,UAAU,CAAEA,UAAU,CAFxB,UAAA,CAGE,WAAW,CAAE,KAAA,KAAA,CAHf,WAAA,CAAA,QAAA,CAAA,CAAA,QAAA,CAAA,YAAA,CAAA,UAAA,CADF,EACE,CAAA,CAAA,CADF,C,yBAPoCH,eAAnBD,S,CAAAA,C","sourcesContent":["import React from 'react';\nimport SceneView from '../SceneView';\n\nexport default class SwitchView extends React.Component {\n render() {\n const { state } = this.props.navigation;\n const activeKey = state.routes[state.index].key;\n const descriptor = this.props.descriptors[activeKey];\n const ChildComponent = descriptor.getComponent();\n\n return (\n <SceneView\n component={ChildComponent}\n navigation={descriptor.navigation}\n screenProps={this.props.screenProps}\n />\n );\n }\n}\n"]},"metadata":{},"sourceType":"script"}