mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-03 15:24:19 -07:00
* Header updates * More pixel alignment for nav * Update unit test snapshots I removed a stray `,` from `testHelpers.tsx` which changed the output of several snapshots. * Fixes from PR review * Forgot to update snapshots after merge with main * Removed unused (and outdated) timeline page * Updated some translation descriptions.
27 lines
661 B
TypeScript
27 lines
661 B
TypeScript
import React, {ReactNode} from 'react';
|
|
import {IntlProvider, IntlContextProvider} from 'gatsby-plugin-intl';
|
|
import messages from '../intl/en.json'; // this is updated by `formatjs extract`
|
|
|
|
const intlConfig = {
|
|
language: 'en',
|
|
languages: ['en', 'es'],
|
|
messages,
|
|
originalPath: '/',
|
|
redirect: true,
|
|
routed: true,
|
|
};
|
|
interface ILocalizedComponentProps {
|
|
children: ReactNode
|
|
}
|
|
|
|
export const LocalizedComponent = ({children}: ILocalizedComponentProps) => {
|
|
return (
|
|
<>
|
|
<IntlContextProvider value={intlConfig} >
|
|
<IntlProvider locale={'en'}>
|
|
{children}
|
|
</IntlProvider>
|
|
</IntlContextProvider>
|
|
</>
|
|
);
|
|
};
|