mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
Update profile.ts to add default values
Add some default values to the LinkedIn data import in case of missing data. Default values used in place of optional data in order to minimize changes to other parts of the codebase; since optionals require an extra step to handle. Default values of whitespace might work better, but I cannot test to be sure. Closes: #1604
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const profileSchema = z.object({
|
||||
"First Name": z.string(),
|
||||
"Last Name": z.string(),
|
||||
"First Name": z.string().default("John"),
|
||||
"Last Name": z.string().default("Doe"),
|
||||
"Maiden Name": z.string().optional(),
|
||||
Address: z.string(),
|
||||
"Birth Date": z.string(),
|
||||
Headline: z.string(),
|
||||
Summary: z.string(),
|
||||
Industry: z.string(),
|
||||
Address: z.string().default("111 Example Street"),
|
||||
"Birth Date": z.string().default("January 1st, 1970"),
|
||||
Headline: z.string().default("An Awesome Person"),
|
||||
Summary: z.string().default("Look at this awesome person"),
|
||||
Industry: z.string().default("Resume Building"),
|
||||
"Zip Code": z.string().optional(),
|
||||
"Geo Location": z.string(),
|
||||
"Twitter Handles": z.string(),
|
||||
Websites: z.string(),
|
||||
"Geo Location": z.string().default("Somewhere"),
|
||||
"Twitter Handles": z.string().default("@test"),
|
||||
Websites: z.string().default("example.com"),
|
||||
"Instant Messengers": z.string().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user