Make ICU types stricter for inline JSX

This commit is contained in:
Jamie Kyle 2024-05-15 14:48:02 -07:00 committed by GitHub
parent 9e7a6ea8bc
commit 6655bfc576
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 220 additions and 200 deletions

View file

@ -6,7 +6,7 @@ import React, { useState } from 'react';
import { get } from 'lodash';
import * as log from '../../logging/log';
import { Intl } from '../Intl';
import { I18n } from '../I18n';
import type {
LocalizerType,
ICUJSXMessageParamsByKeyType,
@ -62,7 +62,7 @@ function renderStringToIntl<Key extends keyof ICUJSXMessageParamsByKeyType>(
i18n: LocalizerType,
components: ICUJSXMessageParamsByKeyType[Key]
): JSX.Element {
return <Intl id={id} i18n={i18n} components={components} />;
return <I18n id={id} i18n={i18n} components={components} />;
}
enum ModalState {
@ -229,7 +229,7 @@ function GroupV2Detail({
i18n={i18n}
onClose={() => setModalState(ModalState.None)}
>
<Intl
<I18n
id="icu:PendingRequests--block--contents"
i18n={i18n}
components={{