mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
4.1 KiB
Plaintext
1 line
4.1 KiB
Plaintext
{"dependencies":[{"name":"../hooks","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":16,"index":136},"end":{"line":5,"column":35,"index":155}}],"key":"v2Yuhjr6LxgVylgzuY6yqo/x8nY=","exportNames":["*"],"imports":1}},{"name":"../useFocusEffect","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":25,"index":182},"end":{"line":6,"column":53,"index":210}}],"key":"Xl2T8spXebYhHf2E93kxkRRgEms=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n 'use client';\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.Redirect = Redirect;\n const hooks_1 = require(_dependencyMap[0], \"../hooks\");\n const useFocusEffect_1 = require(_dependencyMap[1], \"../useFocusEffect\");\n /**\n * Redirects to the `href` as soon as the component is mounted.\n *\n * @example\n * ```tsx\n * import { View, Text } from 'react-native';\n * import { Redirect } from 'expo-router';\n *\n * export default function Page() {\n * const { user } = useAuth();\n *\n * if (!user) {\n * return <Redirect href=\"/login\" />;\n * }\n *\n * return (\n * <View>\n * <Text>Welcome Back!</Text>\n * </View>\n * );\n * }\n * ```\n */\n function Redirect({\n href,\n relativeToDirectory,\n withAnchor\n }) {\n const router = (0, hooks_1.useRouter)();\n (0, useFocusEffect_1.useFocusEffect)(() => {\n try {\n router.replace(href, {\n relativeToDirectory,\n withAnchor\n });\n } catch (error) {\n console.error(error);\n }\n });\n return null;\n }\n exports.default = Redirect;\n});","lineCount":53,"map":[[2,2,1,0],[2,14,1,12],[3,2,2,0],[3,14,2,12],[5,2,3,0,"Object"],[5,8,3,6],[5,9,3,7,"defineProperty"],[5,23,3,21],[5,24,3,22,"exports"],[5,31,3,29],[5,33,3,31],[5,45,3,43],[5,47,3,45],[6,4,3,47,"value"],[6,9,3,52],[6,11,3,54],[7,2,3,59],[7,3,3,60],[7,4,3,61],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"Redirect"],[8,18,4,16],[8,21,4,19,"Redirect"],[8,29,4,27],[9,2,5,0],[9,8,5,6,"hooks_1"],[9,15,5,13],[9,18,5,16,"require"],[9,25,5,23],[9,26,5,23,"_dependencyMap"],[9,40,5,23],[9,55,5,34],[9,56,5,35],[10,2,6,0],[10,8,6,6,"useFocusEffect_1"],[10,24,6,22],[10,27,6,25,"require"],[10,34,6,32],[10,35,6,32,"_dependencyMap"],[10,49,6,32],[10,73,6,52],[10,74,6,53],[11,2,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,0,23,0],[28,0,24,0],[29,0,25,0],[30,0,26,0],[31,0,27,0],[32,0,28,0],[33,0,29,0],[34,2,30,0],[34,11,30,9,"Redirect"],[34,19,30,17,"Redirect"],[34,20,30,18],[35,4,30,20,"href"],[35,8,30,24],[36,4,30,26,"relativeToDirectory"],[36,23,30,45],[37,4,30,47,"withAnchor"],[38,2,30,58],[38,3,30,59],[38,5,30,61],[39,4,31,4],[39,10,31,10,"router"],[39,16,31,16],[39,19,31,19],[39,20,31,20],[39,21,31,21],[39,23,31,23,"hooks_1"],[39,30,31,30],[39,31,31,31,"useRouter"],[39,40,31,40],[39,42,31,42],[39,43,31,43],[40,4,32,4],[40,5,32,5],[40,6,32,6],[40,8,32,8,"useFocusEffect_1"],[40,24,32,24],[40,25,32,25,"useFocusEffect"],[40,39,32,39],[40,41,32,41],[40,47,32,47],[41,6,33,8],[41,10,33,12],[42,8,34,12,"router"],[42,14,34,18],[42,15,34,19,"replace"],[42,22,34,26],[42,23,34,27,"href"],[42,27,34,31],[42,29,34,33],[43,10,34,35,"relativeToDirectory"],[43,29,34,54],[44,10,34,56,"withAnchor"],[45,8,34,67],[45,9,34,68],[45,10,34,69],[46,6,35,8],[46,7,35,9],[46,8,36,8],[46,15,36,15,"error"],[46,20,36,20],[46,22,36,22],[47,8,37,12,"console"],[47,15,37,19],[47,16,37,20,"error"],[47,21,37,25],[47,22,37,26,"error"],[47,27,37,31],[47,28,37,32],[48,6,38,8],[49,4,39,4],[49,5,39,5],[49,6,39,6],[50,4,40,4],[50,11,40,11],[50,15,40,15],[51,2,41,0],[52,2,42,0,"exports"],[52,9,42,7],[52,10,42,8,"default"],[52,17,42,15],[52,20,42,18,"Redirect"],[52,28,42,26],[53,0,42,27],[53,3]],"functionMap":{"names":["<global>","Redirect","<anonymous>"],"mappings":"AAA;AC6B;yCCE;KDO;CDE"},"hasCjsExports":true},"type":"js/module"}]} |