1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-05 04:51:30 +01:00
.profile/components/Portfolio/index.tsx

22 lines
540 B
TypeScript
Raw Normal View History

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