BottomMissionText.tsx
import React from "react";
import { Center, Text } from "@chakra-ui/react";
import IMissionText from "../../interfaces/AboutPage/IMissionText";
//Simple bottom mission text component
export default function BottomMissionText(props: Array<IMissionText>) {
return (
<Center pt={5}>
{props.map((i) => (
<Text>{i.title}</Text>
))}
</Center>
);
}
任务文本.ts
export default interface IMissionText {
title: string;
text: string;
}
MissionBox.tsx(片段)
<Box>
{isT !== false ? (
<BottomMissionText {...traditionalStatement} />
) : null}
{isL !== false ? (
<BottomMissionText {...traditionalStatement} />
) : null}
</Box>
我已经尝试了将近两个小时,并且一直收到此错误(标题)。