1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-09-19 14:05:53 +02:00
.profile/components/Portfolio/index.tsx

22 lines
544 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 (
<div className="flex w-full flex-wrap justify-center px-3">
{items.map((item, index) => {
return <PortfolioItem key={index} {...item} />
})}
</div>
2021-04-18 01:56:23 +02:00
)
}