- {comboBoxSelectedValues.map((item, index) => (
-
-
- {_.startCase(item.toLowerCase())}
- {
-
- }
-
+
+
+ {comboBoxSelectedValues.map((item, index) => (
+
+
+ {_.startCase(item.toLowerCase())}
+ {
+
+ }
- ))}
-
- )}
+
+ ))}
+
>
);
}
diff --git a/src/lib/auth.ts b/src/lib/auth.ts
index b6e19639..f5c44e4d 100644
--- a/src/lib/auth.ts
+++ b/src/lib/auth.ts
@@ -105,7 +105,6 @@ export const options = {
email: email,
password: hashedPassword,
name: name,
- username: 'random', // todo username
},
select: {
id: true,
diff --git a/src/lib/authOptions.ts b/src/lib/authOptions.ts
index 5ed400bb..c34b5d0a 100644
--- a/src/lib/authOptions.ts
+++ b/src/lib/authOptions.ts
@@ -96,7 +96,6 @@ export const authOptions = {
oauthProvider: 'GOOGLE',
email: email as string,
name: name as string,
- username: 'ishadfoi', //to do
avatar,
isVerified: true,
emailVerified: new Date(),
diff --git a/src/lib/validators/user.profile.validator.ts b/src/lib/validators/user.profile.validator.ts
index 5e35bd35..a9d36a90 100644
--- a/src/lib/validators/user.profile.validator.ts
+++ b/src/lib/validators/user.profile.validator.ts
@@ -83,15 +83,16 @@ export const aboutMeSchema = z.object({
aboutMe: z
.string()
.min(50, { message: 'Description must be at least 50 characters' })
- .max(255, { message: 'Description cannot exceed 255 characters' }),
+ .max(255, { message: 'Description cannot exceed 255 characters' })
+ .optional()
+ .or(z.literal('')),
});
export const profileSchema = z.object({
avatar: z.string().optional(),
name: z.string().min(1, 'Name is required'),
- username: z.string().min(1, 'Username is required'),
email: z.string().min(1, 'Email is required').email(),
- contactEmail: z.string().email().optional(),
+ contactEmail: z.string().email().optional().or(z.literal('')),
aboutMe: z
.string()
.min(50, { message: 'Description must be at least 50 characters' })
@@ -131,7 +132,7 @@ export const profileResumeSchema = z.object({
});
export const profileProjectSchema = z.object({
- projectThumbnail: z.string().optional(),
+ projectThumbnail: z.string().min(1, 'Project Thumbnail is required.'),
projectName: z.string().min(1, 'Project name is required'),
projectSummary: z
.string()
@@ -143,7 +144,8 @@ export const profileProjectSchema = z.object({
.refine((url) => url.startsWith('https://'), {
message: 'URL must be a https request',
})
- .optional(),
+ .optional()
+ .or(z.literal('')),
projectGithub: z
.string({ message: 'Github Link is required' })
.url({ message: 'Invalid URL format' })
diff --git a/src/types/user.types.ts b/src/types/user.types.ts
index 54d92389..e0369982 100644
--- a/src/types/user.types.ts
+++ b/src/types/user.types.ts
@@ -38,7 +38,6 @@ export interface ExperienceType {
export interface UserType {
name: string;
- username: string;
id: string;
email: string;
skills: string[];