mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2026-07-12 14:05:08 +10:00
28 lines
587 B
TypeScript
28 lines
587 B
TypeScript
import { z } from "zod";
|
|
|
|
import { defaultItem, defaultUrl, itemSchema, urlSchema } from "../shared";
|
|
|
|
// Schema
|
|
export const profileSchema = itemSchema.extend({
|
|
network: z.string().min(1),
|
|
username: z.string().min(1),
|
|
icon: z
|
|
.string()
|
|
.describe(
|
|
'Slug for the icon from https://simpleicons.org. For example, "github", "linkedin", etc.',
|
|
),
|
|
url: urlSchema,
|
|
});
|
|
|
|
// Type
|
|
export type Profile = z.infer<typeof profileSchema>;
|
|
|
|
// Defaults
|
|
export const defaultProfile: Profile = {
|
|
...defaultItem,
|
|
network: "",
|
|
username: "",
|
|
icon: "",
|
|
url: defaultUrl,
|
|
};
|