2024-01-23 23:59:10 +01:00
|
|
|
import { getI18n } from "@/i18n/i18n.server"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2024-01-23 23:59:10 +01:00
|
|
|
import {
|
|
|
|
InterestsIcons,
|
|
|
|
type InterestParagraphProps,
|
|
|
|
} from "../InterestParagraph"
|
2023-10-23 23:11:59 +02:00
|
|
|
import { InterestItem } from "./InterestItem"
|
2021-04-18 01:56:23 +02:00
|
|
|
|
2023-08-01 17:22:09 +02:00
|
|
|
export const InterestsList = (): JSX.Element => {
|
2024-01-23 23:59:10 +01:00
|
|
|
const i18n = getI18n()
|
|
|
|
|
|
|
|
let paragraphs = i18n.translate<InterestParagraphProps[]>(
|
|
|
|
"home.interests.paragraphs",
|
|
|
|
)
|
|
|
|
if (!Array.isArray(paragraphs)) {
|
|
|
|
paragraphs = []
|
|
|
|
}
|
|
|
|
|
2021-04-18 01:56:23 +02:00
|
|
|
return (
|
2023-10-23 23:11:59 +02:00
|
|
|
<div className="my-4 flex justify-center">
|
|
|
|
<ul className="m-0 flex w-96 list-none justify-around p-0">
|
2024-01-23 23:59:10 +01:00
|
|
|
{paragraphs.map(({ title, id }) => {
|
|
|
|
const icon = InterestsIcons[id]
|
|
|
|
return <InterestItem key={id} title={title} fontAwesomeIcon={icon} />
|
|
|
|
})}
|
2021-05-08 19:52:04 +02:00
|
|
|
</ul>
|
|
|
|
</div>
|
2021-04-18 01:56:23 +02:00
|
|
|
)
|
|
|
|
}
|