Skip to content

Commit

Permalink
Fix eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Oct 22, 2023
1 parent 792bc37 commit 1b88569
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/app/auth/signup.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Redirect, Link, router } from 'expo-router';
import React, { useEffect, useState } from 'react';
import { Alert, View, Text } from 'react-native';
import React, { useState } from 'react';
import { Alert, View } from 'react-native';
import { Button, Input } from 'react-native-elements';

import globalStyles from '../../styles/globalStyles';
Expand Down
21 changes: 10 additions & 11 deletions src/app/auth/verify.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,13 @@ import { Button } from 'react-native-elements';
import globalStyles from '../../styles/globalStyles';
import { useSession } from '../../utils/AuthContext';

const styles = StyleSheet.create({
input: {
height: 40,
borderColor: 'gray',
borderWidth: 1,
marginTop: 10,
padding: 5,
},
});

function VerificationScreen() {
const { user, verifyEmail, resendVerification } = useSession();
const [loading, setLoading] = useState(false);
const [verificationCode, setCode] = useState<string>('');

const verifyAccount = async () => {
setLoading(true);
console.log(user);

if (user?.email && verificationCode) {
const { error, data } = await verifyEmail(user.email, verificationCode);
Expand Down Expand Up @@ -83,3 +72,13 @@ function VerificationScreen() {
}

export default VerificationScreen;

const styles = StyleSheet.create({
input: {
height: 40,
borderColor: 'gray',
borderWidth: 1,
marginTop: 10,
padding: 5,
},
});
2 changes: 1 addition & 1 deletion src/components/UserStringInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function UserStringInput({
<View style={styles.verticallySpaced}>
<Input
label={label}
value={value || ''}
value={value ?? ''}
onChangeText={text => onChange(text)}
/>
</View>
Expand Down
4 changes: 0 additions & 4 deletions src/utils/AuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,6 @@ export function AuthContextProvider({
});
}, []);

useEffect(() => {
console.log(`User updated: ${JSON.stringify(user)}`);
}, [user]);

const signIn = (newSession: Session | null) => {
setSession(newSession);
};
Expand Down

0 comments on commit 1b88569

Please sign in to comment.