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 { InterestParagraphProps } from './InterestParagraph'
|
|
|
|
import { InterestParagraph } from './InterestParagraph'
|
2021-04-18 01:56:23 +02:00
|
|
|
import { InterestsList } from './InterestsList'
|
|
|
|
|
|
|
|
export const Interests: 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 paragraphs = i18n.translate<InterestParagraphProps[]>(
|
|
|
|
'home.interests.paragraphs'
|
2021-05-08 19:52:04 +02:00
|
|
|
)
|
2023-07-31 19:06:46 +02:00
|
|
|
if (!Array.isArray(paragraphs)) {
|
|
|
|
paragraphs = []
|
|
|
|
}
|
2021-04-18 01:56:23 +02:00
|
|
|
|
|
|
|
return (
|
2022-02-23 09:03:10 +01:00
|
|
|
<div className='max-w-full'>
|
|
|
|
{paragraphs.map((paragraph, index) => {
|
|
|
|
return <InterestParagraph key={index} {...paragraph} />
|
|
|
|
})}
|
|
|
|
<InterestsList />
|
|
|
|
</div>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|