2023-10-23 23:11:59 +02:00
|
|
|
import { getI18n } from "@/i18n/i18n.server"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-10-23 23:11:59 +02:00
|
|
|
import type { InterestParagraphProps } from "./InterestParagraph"
|
|
|
|
import { InterestParagraph } from "./InterestParagraph"
|
|
|
|
import { InterestsList } from "./InterestsList"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-08-01 17:22:09 +02:00
|
|
|
export const Interests = (): JSX.Element => {
|
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[]>(
|
2023-10-23 23:11:59 +02:00
|
|
|
"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 (
|
2023-10-23 23:11:59 +02:00
|
|
|
<div className="max-w-full">
|
2024-05-16 09:56:19 +02:00
|
|
|
{paragraphs.map((paragraph) => {
|
|
|
|
return <InterestParagraph key={paragraph.id} {...paragraph} />
|
2022-02-23 09:03:10 +01:00
|
|
|
})}
|
|
|
|
<InterestsList />
|
|
|
|
</div>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|