feat: implemet webview with perfect draft url

This commit is contained in:
marlon passos 2023-12-19 11:23:27 -03:00
parent a90e57e35f
commit b2dfe08d33
4 changed files with 33 additions and 19 deletions

23
App.js
View File

@ -1,20 +1,11 @@
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { WebView, } from 'react-native-webview';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
<StatusBar style="auto" />
</View>
<>
<WebView
source={{ uri: 'https://www.perfectdraft.com.br/' }}
/>
</>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
}

View File

@ -27,4 +27,4 @@
"favicon": "./assets/favicon.png"
}
}
}
}

24
package-lock.json generated
View File

@ -11,7 +11,8 @@
"expo": "~49.0.15",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "0.72.6"
"react-native": "0.72.6",
"react-native-webview": "13.2.2"
},
"devDependencies": {
"@babel/core": "^7.20.0"
@ -11821,6 +11822,27 @@
"react": "18.2.0"
}
},
"node_modules/react-native-webview": {
"version": "13.2.2",
"resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-13.2.2.tgz",
"integrity": "sha512-uT70y2GUqQzaj2RwRb/QuKRdXeDjXM6oN3DdPqYQlOOMFTCT8r62fybyjVVRoik8io+KLa5KnmuSoS5B2O1BmA==",
"dependencies": {
"escape-string-regexp": "2.0.0",
"invariant": "2.2.4"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
}
},
"node_modules/react-native-webview/node_modules/escape-string-regexp": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
"engines": {
"node": ">=8"
}
},
"node_modules/react-native/node_modules/promise": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/promise/-/promise-8.3.0.tgz",

View File

@ -12,7 +12,8 @@
"expo": "~49.0.15",
"expo-status-bar": "~1.6.0",
"react": "18.2.0",
"react-native": "0.72.6"
"react-native": "0.72.6",
"react-native-webview": "13.2.2"
},
"devDependencies": {
"@babel/core": "^7.20.0"