-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Open links from new app screen in computer's browser (#24843)
Summary: This PR is related to #24760 and adds the `openURLInBrowser` functionality introduced on react-native-community/cli#383. [General] [Changed] - Open links from new app in computer's browser. Pull Request resolved: #24843 Reviewed By: rickhanlonii Differential Revision: D15334011 Pulled By: cpojer fbshipit-source-id: 947ad1b113923989cf706e60851e02a87e1099e8
- Loading branch information
1 parent
248a108
commit aa926e3
Showing
4 changed files
with
85 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
* @flow strict-local | ||
*/ | ||
|
||
'use strict'; | ||
|
||
const getDevServer = require('./getDevServer'); | ||
|
||
function openURLInBrowser(url: string) { | ||
fetch(getDevServer().url + 'open-url', { | ||
method: 'POST', | ||
body: JSON.stringify({url}), | ||
}); | ||
} | ||
|
||
module.exports = openURLInBrowser; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aa926e3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lucasbento hey, this broke Android CI. Could you please fix it.