Skip to content

Commit

Permalink
fix ios linking and web
Browse files Browse the repository at this point in the history
  • Loading branch information
staszekscp committed Jun 3, 2024
1 parent ca2d4b5 commit 5154ef0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/InitialURLContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ type InitialURLContextProviderProps = {
function InitialURLContextProvider({children, url}: InitialURLContextProviderProps) {
const [initialURL, setInitialURL] = useState(url);
useEffect(() => {
if (initialURL) {
if (url) {
setInitialURL(url);
return;
}
Linking.getInitialURL().then((initURL) => {
setInitialURL(initURL as Route);
});
}, [initialURL]);
}, [url]);
return <InitialURLContext.Provider value={initialURL}>{children}</InitialURLContext.Provider>;
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/ExitSurvey/ExitSurveyConfirmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ function ExitSurveyConfirmPage({exitReason, isLoading, route, navigation}: ExitS
ExitSurvey.switchToOldDot();

if (NativeModules.HybridAppModule) {
Navigation.resetToHome();
NativeModules.HybridAppModule.closeReactNativeApp();
return;
}
Expand Down

0 comments on commit 5154ef0

Please sign in to comment.