Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
carolynzhuang committed Dec 11, 2024
1 parent 98c34f9 commit 6f6e953
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/GoogleSignInButton/GoogleSignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import * as Google from 'expo-auth-session/providers/google';
import * as WebBrowser from 'expo-web-browser';
import { CompositeScreenProps } from '@react-navigation/native';
import { NativeStackScreenProps } from '@react-navigation/native-stack';
import { useAuth } from '@/context/AuthContext';
import { LoginStackParamList, RootStackParamList } from '@/types/navigation';
import { styles } from './styles';
import { useAuth } from '@/context/AuthContext';

WebBrowser.maybeCompleteAuthSession();

Expand Down
9 changes: 1 addition & 8 deletions src/components/QRCodeScanner/QRCodeScanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
import { NativeStackScreenProps } from '@react-navigation/native-stack';
import { HomeStackParamList } from '@/types/navigation';
import styles from './styles';
import { useAuth } from '@/context/AuthContext';

type QRCodeScannerProps = NativeStackScreenProps<
HomeStackParamList,
Expand Down Expand Up @@ -55,8 +54,6 @@ export default function QRCodeScanner({ navigation }: QRCodeScannerProps) {
return <Text>Permission for camera not granted.</Text>;
}

const { isAuthenticated } = useAuth();

return (
<SafeAreaView style={styles.container}>
<View style={styles.iconFlex}>
Expand Down Expand Up @@ -94,11 +91,7 @@ export default function QRCodeScanner({ navigation }: QRCodeScannerProps) {
qrCodeFound ? styles.scanButtonEnabled : styles.scanButtonDisabled,
]}
onPress={() =>
{isAuthenticated ? (
navigation.push('TreeInfo', { treeId: qrCodeData ?? '' })
) : (
navigation.push('TreeSpecies', { treeId: qrCodeData ?? '' })
)}
navigation.push('TreeInfo', { treeId: qrCodeData ?? '' })
}
disabled={!qrCodeFound}
>
Expand Down

0 comments on commit 6f6e953

Please sign in to comment.