Skip to content

Commit

Permalink
Fix eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 committed Nov 29, 2023
1 parent b56afc1 commit 4d9d598
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/app/auth/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { SafeAreaView } from 'react-native-safe-area-context';
import validator from 'validator';

import styles from './styles';
import StyledButton from '../../../components/StyledButton/StyledButton';
import UserStringInput from '../../../components/UserStringInput/UserStringInput';
import { isEmailUsed, queryEmailByUsername } from '../../../queries/auth';
import globalStyles from '../../../styles/globalStyles';
import { useSession } from '../../../utils/AuthContext';
import StyledButton from '../../../components/StyledButton/StyledButton';
import UserStringInput from '../../../components/UserStringInput/UserStringInput';

function LoginScreen() {
const sessionHandler = useSession();
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth/onboarding/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import { Alert, ScrollView, Platform } from 'react-native';
import { Button } from 'react-native-elements';

import styles from './styles';
import StyledButton from '../../../components/StyledButton/StyledButton';
import UserStringInput from '../../../components/UserStringInput/UserStringInput';
import { useSession } from '../../../utils/AuthContext';
import supabase from '../../../utils/supabase';
import StyledButton from '../../../components/StyledButton/StyledButton';

function OnboardingScreen() {
const { session } = useSession();
Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/signup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function SignUpScreen() {
const [password, setPassword] = useState('');
const [passwordTextHidden, setPasswordTextHidden] = useState(true);
const [loading, setLoading] = useState(false);
let lastUsernameCheck = useRef(Date.now());
const lastUsernameCheck = useRef(Date.now());
const validUsernameCharacters = /^\w+$/g;

const [passwordComplexity, setPasswordComplexity] = useState(false);
Expand Down Expand Up @@ -295,8 +295,8 @@ function SignUpScreen() {
disabled={
!passwordComplexity ||
loading ||
emailError != '' ||
usernameError != '' ||
emailError !== '' ||
usernameError !== '' ||
email.length === 0 ||
username.length === 0
}
Expand Down
10 changes: 5 additions & 5 deletions src/app/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ import { Redirect, router, Link } from 'expo-router';
import { useEffect, useState } from 'react';
import { Text, View, Alert, Platform } from 'react-native';
import { Button } from 'react-native-elements';
import { ScrollView } from 'react-native-gesture-handler';
import { SafeAreaView } from 'react-native-safe-area-context';

import styles from './styles';
import AccountDataDisplay from '../../components/AccountDataDisplay/AccountDataDisplay';
import StyledButton from '../../components/StyledButton/StyledButton';
import UserSelectorInput from '../../components/UserSelectorInput/UserSelectorInput';
import globalStyles from '../../styles/globalStyles';
import { useSession } from '../../utils/AuthContext';
import supabase from '../../utils/supabase';
import styles from './styles';
import AccountDataDisplay from '../../components/AccountDataDisplay/AccountDataDisplay';
import UserSelectorInput from '../../components/UserSelectorInput/UserSelectorInput';
import { ScrollView } from 'react-native-gesture-handler';

function SettingsScreen() {
const { session, signOut } = useSession();
Expand Down Expand Up @@ -184,7 +184,7 @@ function SettingsScreen() {
birthday.toLocaleDateString().toString()
)
}
></AccountDataDisplay>
/>
</View>

<UserSelectorInput
Expand Down
1 change: 1 addition & 0 deletions src/components/AccountDataDisplay/AccountDataDisplay.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { View, Text } from 'react-native';

import styles from './styles';

type AccountDataDisplayProps = {
Expand Down
1 change: 1 addition & 0 deletions src/components/AccountDataDisplay/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { StyleSheet } from 'react-native';

import colors from '../../styles/colors';

export default StyleSheet.create({
Expand Down
3 changes: 2 additions & 1 deletion src/components/UserSelectorInput/UserSelectorInput.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { View, Text } from 'react-native';
import { Dropdown } from 'react-native-element-dropdown';
import styles from './styles';
import { Icon } from 'react-native-elements';

import styles from './styles';

type UserSelectorInputProps = {
options: string[];
label: string;
Expand Down
1 change: 1 addition & 0 deletions src/components/UserSelectorInput/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { StyleSheet } from 'react-native';

import colors from '../../styles/colors';

export default StyleSheet.create({
Expand Down

0 comments on commit 4d9d598

Please sign in to comment.