mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-03-26 08:55:56 +01:00
Merge pull request #2325 from BlueWallet/hodlhodlwebviewhooks
REF: HodlHodlWebView Hooks
This commit is contained in:
commit
0481a476b6
1 changed files with 12 additions and 19 deletions
|
@ -1,27 +1,18 @@
|
|||
import React, { Component } from 'react';
|
||||
import React from 'react';
|
||||
import { WebView } from 'react-native-webview';
|
||||
import { BlueNavigationStyle, SafeBlueArea } from '../../BlueComponents';
|
||||
import PropTypes from 'prop-types';
|
||||
import { useRoute } from '@react-navigation/native';
|
||||
|
||||
export default class HodlHodlWebview extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
const HodlHodlWebview = () => {
|
||||
const { uri } = useRoute().params;
|
||||
|
||||
const uri = props.route.params.uri;
|
||||
|
||||
this.state = {
|
||||
uri,
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<SafeBlueArea>
|
||||
<WebView source={{ uri: this.state.uri }} incognito />
|
||||
</SafeBlueArea>
|
||||
);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<SafeBlueArea>
|
||||
<WebView source={{ uri }} incognito />
|
||||
</SafeBlueArea>
|
||||
);
|
||||
};
|
||||
|
||||
HodlHodlWebview.propTypes = {
|
||||
route: PropTypes.shape({
|
||||
|
@ -31,6 +22,8 @@ HodlHodlWebview.propTypes = {
|
|||
}),
|
||||
};
|
||||
|
||||
export default HodlHodlWebview;
|
||||
|
||||
HodlHodlWebview.navigationOptions = ({ navigation }) => ({
|
||||
...BlueNavigationStyle(navigation, true),
|
||||
title: '',
|
||||
|
|
Loading…
Add table
Reference in a new issue