Skip to content

Commit 00a3b9a

Browse files
committed
fix(layout): enable deep linking while app is in foreground
1 parent e957dab commit 00a3b9a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/app/_layout.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ function RootLayout(): React.JSX.Element {
6565
}
6666
}
6767

68+
Linking.getInitialURL().then((url) => {
69+
if (url) {
70+
handleOpenURL({ url })
71+
}
72+
})
73+
74+
// Handle subsequent URLs when app is in foreground
6875
const linkingSubscription = Linking.addEventListener('url', handleOpenURL)
6976

7077
return () => {

0 commit comments

Comments
 (0)