We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 585c390 commit 9dee681Copy full SHA for 9dee681
src/plugins/rehype-static-to-dynamic.mjs
@@ -161,9 +161,16 @@ function convertStaticToDynamic(code) {
161
path.node.children.length === 0 &&
162
navigatorInfo
163
) {
164
+ // Preserve any props passed to Navigation
165
+ const navigationProps = path.node.openingElement.attributes || [];
166
+
167
// Replace with <NavigationContainer><MyStack /></NavigationContainer>
168
+ // Pass the props from Navigation to NavigationContainer
169
const newElement = t.jsxElement(
- t.jsxOpeningElement(t.jsxIdentifier('NavigationContainer'), []),
170
+ t.jsxOpeningElement(
171
+ t.jsxIdentifier('NavigationContainer'),
172
+ navigationProps
173
+ ),
174
t.jsxClosingElement(t.jsxIdentifier('NavigationContainer')),
175
[
176
t.jsxText('\n '),
0 commit comments