1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-11-05 13:01:30 +01:00
.profile/components/Interests/index.tsx

26 lines
649 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 { InterestParagraphProps } from './InterestParagraph'
import { InterestParagraph } from './InterestParagraph'
2021-04-18 01:56:23 +02:00
import { InterestsList } from './InterestsList'
export const Interests: React.FC = () => {
const i18n = getI18n()
2021-04-18 01:56:23 +02:00
let paragraphs = i18n.translate<InterestParagraphProps[]>(
'home.interests.paragraphs'
)
if (!Array.isArray(paragraphs)) {
paragraphs = []
}
2021-04-18 01:56:23 +02:00
return (
<div className='max-w-full'>
{paragraphs.map((paragraph, index) => {
return <InterestParagraph key={index} {...paragraph} />
})}
<InterestsList />
</div>
2021-04-18 01:56:23 +02:00
)
}