From 3f82d299dfa74112fb0c5a4e863104a69816e2ac Mon Sep 17 00:00:00 2001 From: Nicholas Murray Date: Wed, 9 Feb 2022 15:35:24 -0800 Subject: [PATCH] rn-webview compiles now and style --- config/webpack/webpack.common.js | 18 +++++++++--------- src/pages/wallet/statementModal.js | 11 +++-------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 6b008fd62936..7493a4c7602d 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -97,15 +97,15 @@ const webpackConfig = { }, // Rule for react-native-web-webview - // { - // test: /postMock.html$/, - // use: { - // loader: 'file-loader', - // options: { - // name: '[name].[ext]', - // }, - // }, - // }, + { + test: /postMock.html$/, + use: { + loader: 'file-loader', + options: { + name: '[name].[ext]', + }, + }, + }, // Gives the ability to load local images { diff --git a/src/pages/wallet/statementModal.js b/src/pages/wallet/statementModal.js index 7bd0d68c49be..4c9ad17a7fba 100644 --- a/src/pages/wallet/statementModal.js +++ b/src/pages/wallet/statementModal.js @@ -1,16 +1,12 @@ -import _ from 'underscore'; -import React, {Component} from 'react'; -import {View, TouchableOpacity} from 'react-native'; +import React from 'react'; import PropTypes from 'prop-types'; -import Header from '../../components/Header'; import Navigation from '../../libs/Navigation/Navigation'; import withLocalize, {withLocalizePropTypes} from '../../components/withLocalize'; import CONST from '../../CONST'; import Modal from '../../components/Modal/index.ios'; -import themeColors from '../../styles/themes/default'; +import {WebView} from 'react-native-webview'; import HeaderWithCloseButton from '../../components/HeaderWithCloseButton'; import ScreenWrapper from '../../components/ScreenWrapper'; -import {WebView} from 'react-native-webview'; const propTypes = { /** The route object passed to this page from the navigator */ @@ -42,7 +38,7 @@ const WalletStatementModal = props => ( /> Hello world' }} + source={{html: '

Hello world

'}} /> @@ -51,4 +47,3 @@ const WalletStatementModal = props => ( WalletStatementModal.propTypes = propTypes; WalletStatementModal.displayName = 'WalletStatementModal'; export default withLocalize(WalletStatementModal); -