2023-07-31 19:06:46 +02:00
|
|
|
import { getI18n } from '@/i18n/i18n.server'
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2022-09-04 20:40:58 +02:00
|
|
|
import type { PortfolioItemProps } from './PortfolioItem'
|
|
|
|
import { PortfolioItem } from './PortfolioItem'
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
export const Portfolio: React.FC = () => {
|
2023-07-31 19:06:46 +02:00
|
|
|
const i18n = getI18n()
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-07-31 19:06:46 +02:00
|
|
|
let items = i18n.translate<PortfolioItemProps[]>('home.portfolio.items')
|
|
|
|
if (!Array.isArray(items)) {
|
|
|
|
items = []
|
|
|
|
}
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
return (
|
2021-12-04 15:52:51 +01:00
|
|
|
<div className='flex w-full flex-wrap justify-center px-3'>
|
2021-05-08 19:52:04 +02:00
|
|
|
{items.map((item, index) => {
|
|
|
|
return <PortfolioItem key={index} {...item} />
|
|
|
|
})}
|
|
|
|
</div>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|