react-native-biometric-verifier 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/EmployeeCard.js +6 -6
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -13,10 +13,10 @@ export const EmployeeCard = ({ employeeData }) => {
|
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
const {
|
|
16
|
+
const { facename, faceid, imageurl } = employeeData;
|
|
17
17
|
|
|
18
|
-
const employeeName =
|
|
19
|
-
const employeeId =
|
|
18
|
+
const employeeName = facename || 'Unknown Employee';
|
|
19
|
+
const employeeId = faceid || 'N/A';
|
|
20
20
|
const imageSource = !imageError && imageurl
|
|
21
21
|
? { uri: `${IMAGE_URL}${imageurl}` }
|
|
22
22
|
: { uri: `${GIF_URL}camera.png` }; // Add a local fallback image in assets
|
|
@@ -39,7 +39,7 @@ export const EmployeeCard = ({ employeeData }) => {
|
|
|
39
39
|
|
|
40
40
|
{/* Employee Info */}
|
|
41
41
|
<Text style={styles.empName}>{employeeName}</Text>
|
|
42
|
-
<Text style={styles.empId}>
|
|
42
|
+
<Text style={styles.empId}> ID: {employeeId}</Text>
|
|
43
43
|
|
|
44
44
|
{/* Verified Badge */}
|
|
45
45
|
<View style={styles.employeeDetails}>
|
|
@@ -54,8 +54,8 @@ export const EmployeeCard = ({ employeeData }) => {
|
|
|
54
54
|
|
|
55
55
|
EmployeeCard.propTypes = {
|
|
56
56
|
employeeData: PropTypes.shape({
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
facename: PropTypes.string,
|
|
58
|
+
faceid: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
59
59
|
imageurl: PropTypes.string,
|
|
60
60
|
}),
|
|
61
61
|
};
|
package/src/index.js
CHANGED
|
@@ -84,7 +84,7 @@ const BiometricVerificationModal = React.memo(({ data, qrscan = false, callback
|
|
|
84
84
|
}, [navigation, notifyMessage, resetState, updateState]);
|
|
85
85
|
|
|
86
86
|
const uploadFaceScan = useCallback(async (selfie) => {
|
|
87
|
-
const currentData = dataRef.current
|
|
87
|
+
const currentData = dataRef.current;
|
|
88
88
|
const base64 = await convertImageToBase64(selfie.uri);
|
|
89
89
|
if (!currentData) {
|
|
90
90
|
notifyMessage('Employee data not found.', 'error');
|