worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
20
node_modules/react-i18next/dist/es/withSSR.js
generated
vendored
Normal file
20
node_modules/react-i18next/dist/es/withSSR.js
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import { createElement } from 'react';
|
||||
import { useSSR } from './useSSR.js';
|
||||
import { composeInitialProps } from './context.js';
|
||||
import { getDisplayName } from './utils.js';
|
||||
export const withSSR = () => function Extend(WrappedComponent) {
|
||||
function I18nextWithSSR({
|
||||
initialI18nStore,
|
||||
initialLanguage,
|
||||
...rest
|
||||
}) {
|
||||
useSSR(initialI18nStore, initialLanguage);
|
||||
return createElement(WrappedComponent, {
|
||||
...rest
|
||||
});
|
||||
}
|
||||
I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);
|
||||
I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;
|
||||
I18nextWithSSR.WrappedComponent = WrappedComponent;
|
||||
return I18nextWithSSR;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue