- );
- }
-
render(): JSX.Element {
const {
blockDashedName,
@@ -130,9 +131,12 @@ class Block extends Component {
});
const blockTitle = t(`intro:${superBlock}.blocks.${blockDashedName}.title`);
- const blockIntroArr = [
- t(`intro:${superBlock}.blocks.${blockDashedName}.intro`)
- ];
+ // the real type of TFunction is the type below, because intro can be an array of strings
+ // type RealTypeOFTFunction = TFunction & ((key: string) => string[]);
+ // But changing the type will require refactoring that isn't worth it for a wrong type.
+ const blockIntroArr = t(
+ `intro:${superBlock}.blocks.${blockDashedName}.intro`
+ );
const expandText = t('intro:misc-text.expand');
const collapseText = t('intro:misc-text.collapse');
@@ -167,7 +171,7 @@ class Block extends Component {
)}
- {this.renderBlockIntros(blockIntroArr)}
+