Added hasIpAddress display. Fixed Unknown User name for non-gmail users

This commit is contained in:
2024-08-16 15:31:16 +08:00
parent b9c382eaa8
commit 6a00ec453d
2 changed files with 12 additions and 1 deletions

View File

@@ -81,6 +81,9 @@ const ScannedDataBox: React.FC<ScannedDataBoxProps> = ({ 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<ScannedDataBoxProps> = ({ qrCodeId, clearScanData
{isShorteningService && (
<Text style={styles.shorteningServiceText}>This is a shortening service</Text>
)}
{/* Conditionally display the IP address message */}
{hasIpAddress && (
<Text style={styles.shorteningServiceText}>{hasIpAddress}</Text>
)}
</View>
</View>
@@ -554,6 +561,7 @@ const ScannedDataBox: React.FC<ScannedDataBoxProps> = ({ qrCodeId, clearScanData
);
};
const styles = StyleSheet.create({
// Row styles
row: {