Skip to content

Commit

Permalink
Merge branch 'main' into kyle/styleForgotPassword
Browse files Browse the repository at this point in the history
  • Loading branch information
adityapawar1 authored Mar 10, 2024
2 parents 8b62635 + 8af1c1b commit 34517a7
Show file tree
Hide file tree
Showing 30 changed files with 1,089 additions and 327 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ yarn-error.*

# typescript
*.tsbuildinfo

.vscode/
8 changes: 0 additions & 8 deletions .vscode/extensions.json

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.formatDocument": "explicit",
"source.fixAll.eslint": "explicit"
}
}
523 changes: 449 additions & 74 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@types/validator": "^13.11.5",
"async-mutex": "^0.4.1",
"axios": "^1.5.0",
"cheerio": "^1.0.0-rc.12",
"deprecated-react-native-prop-types": "^4.2.1",
"dom-parser": "^0.1.6",
"expo": "~49.0.11",
Expand All @@ -53,10 +54,10 @@
"react-native-paper": "^5.10.6",
"react-native-render-html": "^6.3.4",
"react-native-root-siblings": "^4.1.1",
"react-native-root-toast": "^3.5.1",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-svg": "13.9.0",
"react-native-toast-message": "^2.2.0",
"react-native-url-polyfill": "^2.0.0",
"react-native-vector-icons": "^10.0.2",
"react-scroll-to-top": "^3.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/app/(tabs)/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import styles from './styles';
import Icon from '../../../../assets/icons';
import ContentCard from '../../../components/ContentCard/ContentCard';
import PreviewCard from '../../../components/PreviewCard/PreviewCard';
import RecentSearchCard from '../../../components/RecentSearchCard/RecentSearchCard';
import { fetchUsername } from '../../../queries/profiles';
import {
fetchFeaturedStoriesDescription,
Expand Down
2 changes: 2 additions & 0 deletions src/app/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Stack } from 'expo-router';
import { SafeAreaProvider } from 'react-native-safe-area-context';

import { AuthContextProvider } from '../utils/AuthContext';
import ToastComponent from '../components/Toast/Toast';

function StackLayout() {
return (
Expand All @@ -14,6 +15,7 @@ function StackLayout() {
<Stack.Screen name="auth" options={{ headerShown: false }} />
</Stack>
</AuthContextProvider>
<ToastComponent />
</SafeAreaProvider>
);
}
Expand Down
1 change: 1 addition & 0 deletions src/app/auth/_layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ function StackLayout() {
<Stack.Screen name="onboarding" options={{ headerShown: false }} />
<Stack.Screen name="verify" options={{ headerShown: false }} />
<Stack.Screen name="forgotPassword" options={{ headerShown: false }} />
<Stack.Screen name="resetPassword" options={{ headerShown: false }} />
</Stack>
);
}
Expand Down
10 changes: 4 additions & 6 deletions src/app/auth/login/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ 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 colors from '../../../styles/colors';
import globalStyles from '../../../styles/globalStyles';
import { useSession } from '../../../utils/AuthContext';

function LoginScreen() {
Expand Down Expand Up @@ -72,7 +72,6 @@ function LoginScreen() {
<Text style={[globalStyles.h1, styles.title]}>
{'Read stories from \nyoung creators'}
</Text>

<UserStringInput
placeholder="Email or Username"
label="Email or Username"
Expand Down Expand Up @@ -101,7 +100,6 @@ function LoginScreen() {
onPress={() => setPasswordTextHidden(!passwordTextHidden)}
/>
</UserStringInput>

<Link
style={[globalStyles.bodyUnderline, styles.forgotPassword]}
href="/auth/forgotPassword"
Expand All @@ -120,12 +118,12 @@ function LoginScreen() {
/>
</View>

<Text style={[globalStyles.body1, styles.redirectText]}>
Don&apos;t have an account?{' '}
<View style={styles.redirectText}>
<Text style={globalStyles.body1}>Don&apos;t have an account?</Text>
<Link style={globalStyles.bodyBoldUnderline} href="/auth/signup">
Sign Up
</Link>
</Text>
</View>
</View>
</SafeAreaView>
);
Expand Down
5 changes: 3 additions & 2 deletions src/app/auth/login/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { StyleSheet } from 'react-native';
import colors from '../../../styles/colors';

export default StyleSheet.create({
flex: {
Expand All @@ -14,7 +13,9 @@ export default StyleSheet.create({
textDecorationLine: 'underline',
},
redirectText: {
textAlign: 'center',
gap: 8,
flexDirection: 'row',
justifyContent: 'center',
marginTop: 16,
marginBottom: 64,
},
Expand Down
26 changes: 19 additions & 7 deletions src/app/auth/onboarding/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
import DateTimePicker from '@react-native-community/datetimepicker';
import { Redirect, router } from 'expo-router';
import { useState, useEffect } from 'react';
import { Alert, ScrollView, Platform, Text } from 'react-native';
import { Alert, ScrollView, Platform, Text, View } from 'react-native';
import { Icon } from 'react-native-elements';

import styles from './styles';
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 globalStyles from '../../../styles/globalStyles';
import UserSelectorInput from '../../../components/UserSelectorInput/UserSelectorInput';
import DateTimePicker from '@react-native-community/datetimepicker';
// import DatePicker from '../../../components/DatePicker/DatePicker';

function OnboardingScreen() {
const { session } = useSession();
const { session, user } = useSession();
const [loading, setLoading] = useState(true);
const [firstName, setFirstName] = useState('');
const [username, setUsername] = useState('');
Expand Down Expand Up @@ -116,8 +117,19 @@ function OnboardingScreen() {

return (
<ScrollView style={styles.container}>
<Text style={globalStyles.h1}>Welcome, {username}</Text>

<Text style={[globalStyles.h1, styles.h1]}>
Welcome, {user?.user_metadata.username}
</Text>
<Text style={[globalStyles.body1, styles.body1]}>
Input your profile information below.
</Text>
<View style={styles.info}>
<Icon type="material" name="info-outline" color="#797979" />
<Text style={[globalStyles.subtext, styles.subtext]}>
This information is only used for outreach efforts, and will not be
visible to other users on the app.
</Text>
</View>
<UserSelectorInput
options={['Female', 'Male', 'Prefer Not to Disclose', 'Other']}
label="Gender"
Expand Down
31 changes: 19 additions & 12 deletions src/app/auth/onboarding/styles.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
import { StyleSheet } from 'react-native';

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

export default StyleSheet.create({
input: {
height: 40,
borderColor: 'gray',
borderWidth: 1,
marginTop: 10,
padding: 5,
},
verticallySpaced: {
paddingTop: 4,
paddingBottom: 4,
alignSelf: 'stretch',
},
container: {
paddingVertical: 63,
paddingLeft: 43,
paddingRight: 44,
},
subtext: {
color: colors.darkGrey,
marginLeft: 8,
},
h1: {
marginTop: 66,
},
body1: {
marginTop: 26,
},
info: {
flex: 1,
flexDirection: 'row',
marginTop: 12,
marginBottom: 16,
width: 250,
},
});
11 changes: 11 additions & 0 deletions src/app/auth/resetPassword/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { Stack } from 'expo-router';

function StackLayout() {
return (
<Stack>
<Stack.Screen name="index" options={{ headerShown: false }} />
</Stack>
);
}

export default StackLayout;
Loading

0 comments on commit 34517a7

Please sign in to comment.