-
Notifications
You must be signed in to change notification settings - Fork 0
feat: implement user profile management with avatar and phone number … #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…updates, and add new UI components for modals, headers, and avatars.
|
|
||
| const settingsSchema = z.object({ | ||
| name: z.string().min(3, "Name must be at least 3 characters"), | ||
| name: z.optional(z.string().min(3, "Name must be at least 3 characters")), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this optional in name
| <View className="mr-4 flex-row items-center gap-4"> | ||
| <TouchableOpacity onPress={handleToggleTheme}> | ||
| {colorScheme === "dark" ? ( | ||
| <Moon size={24} className="text-foreground" color="#FFFFFF" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this dark mode and logout to settings page. As the user is not going to frequently logout of the application.
| @@ -0,0 +1,27 @@ | |||
| import { useRouter } from "expo-router"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the system default back button here. Research if it is needed in web
| @@ -1,26 +1,38 @@ | |||
| import { zodResolver } from "@hookform/resolvers/zod"; | |||
| import { useMutation, useQuery } from "convex/react"; | |||
| import * as ImagePicker from "expo-image-picker"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactor this file
| export const authSchema = z.object({ | ||
| email: z.email("Please enter a valid email address"), | ||
| const signInSchema = z.object({ | ||
| email: z.string().email("Please enter a valid email address"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string().email() is deprecated. revert back
| const signInSchema = z.object({ | ||
| email: z.string().email("Please enter a valid email address"), | ||
| password: z.string().min(8, "Password must be at least 8 characters"), | ||
| name: z.string().optional(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont need name here right
| name: z.string().min(2, "Name is required"), | ||
| }); | ||
|
|
||
| export type AuthFormData = z.infer<typeof signUpSchema>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolver is using same schema for both sign in and sign up
…updates, and add new UI components for modals, headers, and avatars.