Skip to content

Commit

Permalink
feat(client): add sign up button to sign-in screen
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed Feb 8, 2025
1 parent 8694917 commit dc1a38d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
21 changes: 9 additions & 12 deletions apps/client/app/auth/sign-in.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useCallback, useState } from 'react'
import { Text, View } from 'react-native'
import { Link, useRouter } from 'expo-router'
import { Camera } from 'lucide-react-native'
import { LockKeyhole, Mail } from 'lucide-react-native'
import { Button } from '@/components/ui/button'
import { Container } from '@/components/ui/Container'
import { Input } from '@/components/ui/input'
Expand All @@ -15,7 +15,6 @@ export default function Page() {
const [password, setPassword] = useState('')

const onSignInPress = useCallback(async () => {
return
if (!isLoaded) return

try {
Expand Down Expand Up @@ -43,28 +42,26 @@ export default function Page() {
collaborative learning.
</Text>
</View>
<View className="gap-2">
<View className="gap-4 px-6">
<Input
icon={Camera}
icon={Mail}
autoCapitalize="none"
value={emailAddress}
placeholder="Enter your email"
onChangeText={(emailAddress) => setEmailAddress(emailAddress)}
/>
<Input
icon={Camera}
icon={LockKeyhole}
value={password}
placeholder="Enter password"
secureTextEntry={true}
onChangeText={(password) => setPassword(password)}
/>
<Button title="Sign in" onPress={onSignInPress} />
<View>
<Text>Don't have an account?</Text>
<Link href="/auth/sign-up">
<Text>Sign up</Text>
</Link>
</View>
<Button title="Sign In" onPress={onSignInPress} />

<Link href="/auth/sign-up" asChild>
<Button title="Sign Up" />
</Link>
</View>
</Container>
)
Expand Down
3 changes: 0 additions & 3 deletions apps/client/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import Animated, {
interpolate,
useAnimatedStyle,
useSharedValue,
withDelay,
withSequence,
withSpring,
withTiming,
} from 'react-native-reanimated'
import { cn } from '@/lib/cn'
Expand Down
3 changes: 2 additions & 1 deletion apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"ios": "expo start --ios",
"web": "expo start --web",
"test": "jest --watchAll",
"lint": "expo lint"
"lint": "npx eslint_d . --max-warnings 0",
"expo:lint": "expo lint "
},
"jest": {
"preset": "jest-expo"
Expand Down

0 comments on commit dc1a38d

Please sign in to comment.