2023-10-23 23:11:59 +02:00
|
|
|
import { getI18n } from "@/i18n/i18n.server"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import type { PortfolioItemProps } from "./PortfolioItem"
|
|
|
|
import { PortfolioItem } from "./PortfolioItem"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-08-01 17:22:09 +02:00
|
|
|
export const Portfolio = (): JSX.Element => {
|
2023-07-31 19:06:46 +02:00
|
|
|
const i18n = getI18n()
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
let items = i18n.translate<PortfolioItemProps[]>("home.portfolio.items")
|
2023-07-31 19:06:46 +02:00
|
|
|
if (!Array.isArray(items)) {
|
|
|
|
items = []
|
|
|
|
}
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
return (
|
2024-05-16 09:56:19 +02:00
|
|
|
<ul className="flex w-full flex-wrap justify-center px-3">
|
|
|
|
{items.map((item) => {
|
|
|
|
return <PortfolioItem key={item.title} {...item} />
|
2021-05-08 19:52:04 +02:00
|
|
|
})}
|
2024-05-16 09:56:19 +02:00
|
|
|
</ul>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|