Skip to content

Commit

Permalink
resolved the lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
shreya-mishra committed Aug 8, 2023
1 parent c675eed commit 5801ac2
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/screens/AuthScreen/AuthScreen.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext, useState } from 'react';
import React, { useContext, useEffect, useState } from 'react';
import DeviceInfo from 'react-native-device-info';
import {
Text,
Expand Down Expand Up @@ -29,6 +29,7 @@ const AuthScreen = () => {
const [githubView, setGithubView] = useState<boolean>(false);
const [loading, setLoading] = useState(false);
const [cameraActive, setCameraActive] = useState(false);
const [scannedUserId, setScannedUserID] = useState('');

const activateCamera = async () => {
try {
Expand All @@ -40,9 +41,7 @@ const AuthScreen = () => {
};

const handleQRCodeScanned = ({ nativeEvent }: any) => {
console.log('nativeEvent.codeStringValue', nativeEvent.codeStringValue);
// setScanResult(nativeEvent.codeStringValue);
// navigation.navigate('Result', { data: nativeEvent.codeStringValue });
setScannedUserID(nativeEvent.codeStringValue);
};

//TODO: add to constants
Expand Down Expand Up @@ -85,7 +84,7 @@ const AuthScreen = () => {
},
body: JSON.stringify({
device_info: deviceInfo,
user_id: 'BE9a4sGXFLDwxZU3DSiq', //TODO: replace with scanner results
user_id: scannedUserId,
device_id: deviceId,
}),
});
Expand Down Expand Up @@ -113,7 +112,7 @@ const AuthScreen = () => {
};

// TODO: trigger on qr code scan
React.useEffect(() => {
useEffect(() => {
getAuthStatus();
}, []);

Check failure on line 117 in src/screens/AuthScreen/AuthScreen.tsx

View workflow job for this annotation

GitHub Actions / build (16.x)

React Hook useEffect has a missing dependency: 'getAuthStatus'. Either include it or remove the dependency array

Expand Down

0 comments on commit 5801ac2

Please sign in to comment.