1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-09 22:09:07 +01: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
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 = (): 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 (
2021-12-04 15:52:51 +01:00
<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
)
}