root.tsx 973 B

123456789101112131415161718192021222324252627282930313233343536
  1. import { useTranslation } from 'react-i18next'
  2. import useWaitForI18n from '@/shared/hooks/use-wait-for-i18n'
  3. import OLRow from '@/shared/components/ol/ol-row'
  4. import OLCol from '@/shared/components/ol/ol-col'
  5. import OLPageContentCard from '@/shared/components/ol/ol-page-content-card'
  6. import EmailPreferencesForm from './email-preferences-form'
  7. function EmailPreferencesRoot() {
  8. const { isReady } = useWaitForI18n()
  9. return (
  10. <div className="container">
  11. <OLRow>
  12. <OLCol xl={{ span: 10, offset: 1 }}>
  13. {isReady ? <EmailPreferencesContent /> : null}
  14. </OLCol>
  15. </OLRow>
  16. </div>
  17. )
  18. }
  19. function EmailPreferencesContent() {
  20. const { t } = useTranslation()
  21. return (
  22. <OLPageContentCard>
  23. <div className="page-header">
  24. <h1>{t('newsletter_info_title')}</h1>
  25. </div>
  26. <p>{t('newsletter_info_summary')}</p>
  27. <EmailPreferencesForm />
  28. </OLPageContentCard>
  29. )
  30. }
  31. export default EmailPreferencesRoot