|
|
@@ -1,5 +1,6 @@
|
|
|
import { ISentence } from "../SentEdit";
|
|
|
import SentCell from "./SentCell";
|
|
|
+import { WbwSentCtl } from "../WbwSent";
|
|
|
interface IWidgetSentContent {
|
|
|
origin?: ISentence[];
|
|
|
translation?: ISentence[];
|
|
|
@@ -14,7 +15,11 @@ const Widget = ({
|
|
|
<div style={{ display: "flex", flexDirection: layout }}>
|
|
|
<div style={{ flex: "5", color: "#9f3a01" }}>
|
|
|
{origin?.map((item, id) => {
|
|
|
- return <SentCell key={id} data={item} wordWidget={true} />;
|
|
|
+ if (item.channel.type === "wbw") {
|
|
|
+ return <WbwSentCtl key={id} data={JSON.parse(item.content)} />;
|
|
|
+ } else {
|
|
|
+ return <SentCell key={id} data={item} wordWidget={true} />;
|
|
|
+ }
|
|
|
})}
|
|
|
</div>
|
|
|
<div style={{ flex: "5" }}>
|