diff --git a/components/ScannedDataBox.tsx b/components/ScannedDataBox.tsx index 01e7fc1..4adec6e 100644 --- a/components/ScannedDataBox.tsx +++ b/components/ScannedDataBox.tsx @@ -81,6 +81,9 @@ const ScannedDataBox: React.FC = ({ qrCodeId, clearScanData const isShorteningService = details.shorteningService === 'Yes'; const classification = details.classifications || 'Unknown'; + // New state to check if the URL contains an IP address + const hasIpAddress = details.hasIpAddress || ''; + // Function to get security text and icon based on the URL description const getSecurityStatus = () => { if (data.info?.description === "Secure Uniform Resource Locator") { @@ -250,6 +253,10 @@ const ScannedDataBox: React.FC = ({ qrCodeId, clearScanData {isShorteningService && ( This is a shortening service )} + {/* Conditionally display the IP address message */} + {hasIpAddress && ( + {hasIpAddress} + )} @@ -554,6 +561,7 @@ const ScannedDataBox: React.FC = ({ qrCodeId, clearScanData ); }; + const styles = StyleSheet.create({ // Row styles row: { diff --git a/screens/SettingsScreen.tsx b/screens/SettingsScreen.tsx index 402794b..69ba4a3 100644 --- a/screens/SettingsScreen.tsx +++ b/screens/SettingsScreen.tsx @@ -148,6 +148,9 @@ const SettingsScreen: React.FC = () => { ]); }; + + const userName = userAttributes?.name || (userEmail ? userEmail.split('@')[0] : 'Unknown User'); + return ( Settings @@ -156,7 +159,7 @@ const SettingsScreen: React.FC = () => { - Hello, {userAttributes?.name || 'Unknown User'} + Hello, {userName} {userAttributes ? (