diff --git a/components/ScannedDataBox.tsx b/components/ScannedDataBox.tsx index 6f38ccc..b496b9d 100644 --- a/components/ScannedDataBox.tsx +++ b/components/ScannedDataBox.tsx @@ -1,5 +1,5 @@ import React, { useEffect, useState } from 'react'; -import { View, Text, StyleSheet, Image, TouchableOpacity } from 'react-native'; +import { View, Text, StyleSheet, Image, TouchableOpacity, Modal } from 'react-native'; import QRCode from 'react-native-qrcode-svg'; import { Ionicons } from '@expo/vector-icons'; @@ -17,6 +17,7 @@ interface ScanResult { const ScannedDataBox: React.FC = ({ data, dataType, clearScanData }) => { const [scanResult, setScanResult] = useState(null); + const [isModalVisible, setIsModalVisible] = useState(false); useEffect(() => { if (data.includes('https://Safe_website.com')) { @@ -104,6 +105,37 @@ const ScannedDataBox: React.FC = ({ data, dataType, clearSc Open + + More Information + setIsModalVisible(true)}> + + Security Headers + + + + setIsModalVisible(false)} + > + + + Security Headers + Name: Strict-Transport-Security + Value: _ + Name: X-Frame-Options + Value: _ + Name: X-Content-Type-Options + Value: _ + Name: Content-Security-Policy + Value: _ + setIsModalVisible(false)}> + Close + + + + ); }; @@ -180,11 +212,67 @@ const styles = StyleSheet.create({ color: '#2196F3', marginTop: 5, }, + moreInfoText: { + fontSize: 18, + fontWeight: 'bold', + color: '#000', + marginVertical: 10, + }, + moreInfoButton: { + flexDirection: 'row', + alignItems: 'center', + paddingVertical: 10, + paddingHorizontal: 15, + backgroundColor: '#ffe6f0', + borderRadius: 10, + marginTop: 10, + }, + moreInfoButtonText: { + flex: 1, + fontSize: 16, + color: '#000', + marginLeft: 10, + }, closeButton: { position: 'absolute', top: 10, right: 10, }, + modalContainer: { + flex: 1, + justifyContent: 'center', + alignItems: 'center', + backgroundColor: 'rgba(0, 0, 0, 0.5)', + }, + modalContent: { + width: '80%', + backgroundColor: 'white', + borderRadius: 10, + padding: 20, + alignItems: 'center', + }, + modalTitle: { + fontSize: 20, + fontWeight: 'bold', + marginBottom: 10, + }, + modalText: { + fontSize: 16, + marginBottom: 5, + textAlign: 'left', + width: '100%', + }, + closeModalButton: { + marginTop: 20, + paddingVertical: 10, + paddingHorizontal: 20, + backgroundColor: '#ff69b4', + borderRadius: 5, + }, + closeModalButtonText: { + fontSize: 16, + color: '#fff', + }, }); export default ScannedDataBox;