mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-26 01:44:53 +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";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const profileSchema = z.object({
|
export const profileSchema = z.object({
|
||||||
"First Name": z.string(),
|
"First Name": z.string().default("John"),
|
||||||
"Last Name": z.string(),
|
"Last Name": z.string().default("Doe"),
|
||||||
"Maiden Name": z.string().optional(),
|
"Maiden Name": z.string().optional(),
|
||||||
Address: z.string(),
|
Address: z.string().default("111 Example Street"),
|
||||||
"Birth Date": z.string(),
|
"Birth Date": z.string().default("January 1st, 1970"),
|
||||||
Headline: z.string(),
|
Headline: z.string().default("An Awesome Person"),
|
||||||
Summary: z.string(),
|
Summary: z.string().default("Look at this awesome person"),
|
||||||
Industry: z.string(),
|
Industry: z.string().default("Resume Building"),
|
||||||
"Zip Code": z.string().optional(),
|
"Zip Code": z.string().optional(),
|
||||||
"Geo Location": z.string(),
|
"Geo Location": z.string().default("Somewhere"),
|
||||||
"Twitter Handles": z.string(),
|
"Twitter Handles": z.string().default("@test"),
|
||||||
Websites: z.string(),
|
Websites: z.string().default("example.com"),
|
||||||
"Instant Messengers": z.string().optional(),
|
"Instant Messengers": z.string().optional(),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user