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
26 lines
649 B
TypeScript
26 lines
649 B
TypeScript
import { getI18n } from '@/i18n/i18n.server'
|
|
|
|
import type { InterestParagraphProps } from './InterestParagraph'
|
|
import { InterestParagraph } from './InterestParagraph'
|
|
import { InterestsList } from './InterestsList'
|
|
|
|
export const Interests: React.FC = () => {
|
|
const i18n = getI18n()
|
|
|
|
let paragraphs = i18n.translate<InterestParagraphProps[]>(
|
|
'home.interests.paragraphs'
|
|
)
|
|
if (!Array.isArray(paragraphs)) {
|
|
paragraphs = []
|
|
}
|
|
|
|
return (
|
|
<div className='max-w-full'>
|
|
{paragraphs.map((paragraph, index) => {
|
|
return <InterestParagraph key={index} {...paragraph} />
|
|
})}
|
|
<InterestsList />
|
|
</div>
|
|
)
|
|
}
|