expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
20 lines (18 loc) • 607 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "getModalRouteKeys", {
enumerable: true,
get: function() {
return getModalRouteKeys;
}
});
const getModalRouteKeys = (routes, descriptors)=>routes.reduce((acc, route)=>{
const { presentation } = descriptors[route.key]?.options ?? {};
if (acc.length && !presentation || presentation === 'modal' || presentation === 'transparentModal') {
acc.push(route.key);
}
return acc;
}, []);
//# sourceMappingURL=getModalRoutesKeys.js.map