1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-12-08 00:44:30 +01:00
.profile/components/Portfolio/index.tsx

22 lines
540 B
TypeScript

import { getI18n } from "@/i18n/i18n.server"
import type { PortfolioItemProps } from "./PortfolioItem"
import { PortfolioItem } from "./PortfolioItem"
export const Portfolio = (): JSX.Element => {
const i18n = getI18n()
let items = i18n.translate<PortfolioItemProps[]>("home.portfolio.items")
if (!Array.isArray(items)) {
items = []
}
return (
<ul className="flex w-full flex-wrap justify-center px-3">
{items.map((item) => {
return <PortfolioItem key={item.title} {...item} />
})}
</ul>
)
}