Skip to content

Commit

Permalink
chore: fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
MounirDhahri committed Dec 19, 2024
1 parent b04e407 commit 02cbb28
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/app/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ export function addWebViewRoute(
config?: ArtsyWebViewConfig,
screenOptions?: NativeStackNavigationOptions
) {
return addRoute(
url,
config?.alwaysPresentModally ? "ModalWebView" : "ReactWebView",
(params) => ({
return addRoute(url, config?.alwaysPresentModally ? "ModalWebView" : "ReactWebView", (params) => {
const injectedParams = {
url: replaceParams(url, params),
isPresentedModally: !!config?.alwaysPresentModally,
screenOptions,
...config,
})
)
}
if (screenOptions) {
// @ts-expect-error
injectedParams["screenOptions"] = screenOptions
}
return injectedParams
})
}

export function replaceParams(url: string, params: any) {
Expand Down

0 comments on commit 02cbb28

Please sign in to comment.