Skip to content

Commit 0210ac4

Browse files
hannesmcmanhawkrives
authored andcommitted
add openUrlInBrowser function
1 parent 12b1353 commit 0210ac4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

modules/open-url/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
// @flow
22

3-
export {openUrl, trackedOpenUrl, canOpenUrl} from './open-url'
3+
export {openUrl, trackedOpenUrl, canOpenUrl, openUrlInBrowser} from './open-url'

modules/open-url/open-url.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,8 @@ export function canOpenUrl(url: string) {
7272
}
7373
return true
7474
}
75+
76+
export function openUrlInBrowser({url, id}: {url: string, id?: string}) {
77+
trackUrl(id || url)
78+
return genericOpen(url)
79+
}

0 commit comments

Comments
 (0)