* feat(docs): add interactive examples and API references for Button, Card, and LoadingFallback components - Updated dependencies - Set `retries` to a fixed value of 3 for consistent test retries across environments. - Increased `timeout` from 60 seconds to 120 seconds to allow more time for tests to complete. - Reduced `expect` timeout from 10 seconds to 5 seconds for quicker feedback on assertions.
14 lines
376 B
TypeScript
14 lines
376 B
TypeScript
import { createI18nServerInstance } from './i18n.server';
|
|
|
|
type LayoutOrPageComponent<Params> = React.ComponentType<Params>;
|
|
|
|
export function withI18n<Params extends object>(
|
|
Component: LayoutOrPageComponent<Params>,
|
|
) {
|
|
return async function I18nServerComponentWrapper(params: Params) {
|
|
await createI18nServerInstance();
|
|
|
|
return <Component {...params} />;
|
|
};
|
|
}
|