From 0dd10ad9dc667972c570c1ded7a72f497ce8d2da Mon Sep 17 00:00:00 2001 From: burakgur Date: Mon, 15 Jan 2024 00:41:33 +0300 Subject: [PATCH] added social urls to print --- src/app/page.tsx | 10 ++++++++++ src/lib/utils.ts | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/src/app/page.tsx b/src/app/page.tsx index b4542e87..ae39920c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -8,6 +8,7 @@ import { GlobeIcon, MailIcon, PhoneIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { RESUME_DATA } from "@/data/resume-data"; import { ProjectCard } from "@/components/project-card"; +import { getUrlWithoutProtocol } from "@/lib/utils"; export const metadata: Metadata = { title: `${RESUME_DATA.name} | ${RESUME_DATA.about}`, @@ -84,6 +85,15 @@ export default function Page() { {RESUME_DATA.contact.tel} ) : null} +
+ {RESUME_DATA.contact.social.map((social) => ( + + + {getUrlWithoutProtocol(social.url)} + + + ))} +
diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 365058ce..7ac0d0bc 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -4,3 +4,7 @@ import { twMerge } from "tailwind-merge"; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } + +export function getUrlWithoutProtocol(url: string) { + return url.replace("https://", "").replace("www.", ""); +}