Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,18 @@ async function checkResultAndReturnUrl(

export async function openBrowserAsync(
url: string,
options?: InAppBrowserOptions = {
options?: InAppBrowserOptions = {}
): Promise<BrowserResult> {
const defaults = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello mate, thanks for your contribution!
Can you move the default settings outside this method please? and can you include the type InAppBrowserOptions for that new variable?

animated: true,
modalEnabled: true,
dismissButtonStyle: 'close',
readerMode: false,
enableBarCollapsing: false,
}
): Promise<BrowserResult> {
};

return RNInAppBrowser.open({
...defaults,
...options,
url,
preferredBarTintColor:
Expand Down