Addes Share functionality, Added SecureWebView for Open Button.Restored Comments for QRScannerScreen

This commit is contained in:
2024-07-07 16:53:05 +08:00
parent 19a1230781
commit 304d5932f7
4 changed files with 83 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import React from 'react';
import { WebView } from 'react-native-webview';
// Define the SecureWebView component
const SecureWebView = ({ url }) => {
return (
<WebView
source={{ uri: url }} // Load the URL passed as a prop
javaScriptEnabled={false} // Disable JavaScript for security
domStorageEnabled={false} // Disable DOM storage for security
allowFileAccess={false} // Disable file access within the WebView for security
originWhitelist={['*']} // Allow all origins to be loaded in the WebView
onShouldStartLoadWithRequest={(request) => {
// Implement additional URL filtering logic here if needed
return true; // Return true to allow the URL to be loaded
}}
/>
);
};
export default SecureWebView;