From 8037fd83ebee9891b88e005b80a8a0eb0950bc1f Mon Sep 17 00:00:00 2001 From: OmitNomis Date: Sun, 31 Dec 2023 13:09:37 +0545 Subject: [PATCH] feat: add types, allow bullets for description --- src/app/page.tsx | 23 +++++++++++-- src/data/resume-data.tsx | 3 +- src/data/resume-data.types.ts | 64 +++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 src/data/resume-data.types.ts diff --git a/src/app/page.tsx b/src/app/page.tsx index 1e6b5d53..ade8cf23 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,3 +1,4 @@ +import React from "react"; import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { Card, CardHeader, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; @@ -68,7 +69,10 @@ export default function Page() { asChild > - + {React.createElement( + social.icon as React.ComponentType<{ className: string }>, + { className: "h-4 w-4" }, + )} ))} @@ -132,7 +136,20 @@ export default function Page() { - {work.description} + {typeof work.description === "string" ? ( +

{work.description}

+ ) : ( + work.description?.map((desc) => { + return ( +

+ + {work?.customBullet || "•"} + + {desc} +

+ ); + }) + )}
); @@ -177,7 +194,7 @@ export default function Page() { title={project.title} description={project.description} tags={project.techStack} - link={"link" in project ? project.link.href : undefined} + link={"link" in project ? project.link?.href : undefined} /> ); })} diff --git a/src/data/resume-data.tsx b/src/data/resume-data.tsx index bedfae6e..64968225 100644 --- a/src/data/resume-data.tsx +++ b/src/data/resume-data.tsx @@ -18,8 +18,9 @@ import { YearProgressLogo, } from "@/images/logos"; import { GitHubIcon, LinkedInIcon, XIcon } from "@/components/icons"; +import { ResumeData } from "./resume-data.types"; -export const RESUME_DATA = { +export const RESUME_DATA: ResumeData = { name: "Bartosz Jarocki", initials: "BJ", location: "Wrocław, Poland, CET", diff --git a/src/data/resume-data.types.ts b/src/data/resume-data.types.ts new file mode 100644 index 00000000..074ac2e6 --- /dev/null +++ b/src/data/resume-data.types.ts @@ -0,0 +1,64 @@ +import { StaticImageData } from "next/image"; +export type ResumeData = { + name: string; + initials: string; + location: string; + locationLink: string; + about: string; + summary: string; + avatarUrl: string; + personalWebsiteUrl: string; + contact: { + email: string; + tel: string; + social: { + name: string; + url: string; + icon: React.ComponentType; + }[]; + }; + education: { + school: string; + degree: string; + grade?: string; + start: string; + end: string; + }[]; + work: { + company: string; + link: string; + badges: string[]; + title: string; + logo: React.ComponentType<{}> | StaticImageData; + start: string; + end: string; + description: string | string[]; + customBullet?: string; + }[]; + skills: string[]; + projects: { + title: string; + techStack: string[]; + description: string; + logo: React.ComponentType<{}> | StaticImageData; + link?: { + label: string; + href: string; + }; + }[]; + certification?: { + name: string; + providerName: string; + link: string; + issueDate: string; + expirationDate: string; + certificateId: string; + }[]; + publication?: { + name: string; + providerName: string; + link: string; + issueDate: string; + description: string; + }[]; +};