"use client";
import { Icon } from "@iconify/react";
import Image from "next/image";
import { useLocale, useTranslations } from "next-intl";
import { Badge, Button, ButtonIcon, ButtonLabel, Card, Typography } from "poyraz-ui/atoms";
import { Sheet, SheetContent, SheetTitle, SheetTrigger } from "poyraz-ui/molecules";
import { Link, useRouter } from "@/i18n/routing";
import { BOOKMARKS } from "@/data/bookmarks";
import { certificates } from "@/data/certificates";
import { EDUCATION } from "@/data/education";
import { EXPERIENCE } from "@/data/experience";
import { getLocalizedValue } from "@/lib/locale";
type TimelineItem = {
id: string;
title: string;
subtitle: string;
period: string;
current?: boolean;
description?: string;
};
function SectionHeading({
title,
action,
}: {
title: string;
action?: React.ReactNode;
}) {
return (
{title}
{action}
);
}
function TimelineList({ items }: { items: TimelineItem[] }) {
return (
{items.map((item) => {
return (
{item.title}
{item.subtitle}
{item.period}
{item.description ? (
{item.description}
) : null}
);
})}
);
}
export function AboutContent() {
const t = useTranslations("About");
const locale = useLocale();
const router = useRouter();
const educationItems: TimelineItem[] = EDUCATION.map((item) => ({
id: item.id,
title: getLocalizedValue(item.title, locale),
subtitle: item.institution,
period: getLocalizedValue(item.period, locale),
current: "current" in item ? item.current : undefined,
}));
const experienceItems: TimelineItem[] = EXPERIENCE.map((item) => ({
id: item.id,
title: getLocalizedValue(item.role, locale),
subtitle: item.company,
period: getLocalizedValue(item.period, locale),
current: "current" in item ? item.current : undefined,
}));
return (
router.push("/contact")}
>
{t("contactCta")}
}
/>
{t("aboutText")}
{t("allCertificates")}
{certificates.map((item) => (
{getLocalizedValue(item.name, locale)}
{item.organization}
{getLocalizedValue(item.date, locale)}
))}
}
/>
{certificates.slice(0, 8).map((item) => (
{getLocalizedValue(item.name, locale)}
{item.organization}
))}
{t("referencesTitle")}
{t("referencesDesc")}
{t("volunteerTitle")}
{t("volunteerDesc")}
{t("bookmarksTitle")}
{BOOKMARKS.map((item) => (
{item.title}
{item.tag}
{getLocalizedValue(item.description, locale)}
{item.href.replace("https://", "")}
))}
);
}