mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-05 13:01:30 +01:00
Théo LUDWIG
6b29ce9b15
Improvements: - Hide switch theme input (ugly little white square) - i18n without subpath (e.g: /fr or /en), same url whatever the locale used
22 lines
541 B
TypeScript
22 lines
541 B
TypeScript
import { getI18n } from '@/i18n/i18n.server'
|
|
|
|
import type { PortfolioItemProps } from './PortfolioItem'
|
|
import { PortfolioItem } from './PortfolioItem'
|
|
|
|
export const Portfolio: React.FC = () => {
|
|
const i18n = getI18n()
|
|
|
|
let items = i18n.translate<PortfolioItemProps[]>('home.portfolio.items')
|
|
if (!Array.isArray(items)) {
|
|
items = []
|
|
}
|
|
|
|
return (
|
|
<div className='flex w-full flex-wrap justify-center px-3'>
|
|
{items.map((item, index) => {
|
|
return <PortfolioItem key={index} {...item} />
|
|
})}
|
|
</div>
|
|
)
|
|
}
|