|
@@ -13,6 +13,7 @@ import { ArticleMode } from "../article/Article";
|
|
|
import { TChannelType } from "../api/Channel";
|
|
import { TChannelType } from "../api/Channel";
|
|
|
import { useAppSelector } from "../../hooks";
|
|
import { useAppSelector } from "../../hooks";
|
|
|
import { currFocus } from "../../reducers/focus";
|
|
import { currFocus } from "../../reducers/focus";
|
|
|
|
|
+import { ISentenceData } from "../api/Corpus";
|
|
|
|
|
|
|
|
export interface IResNumber {
|
|
export interface IResNumber {
|
|
|
translation?: number;
|
|
translation?: number;
|
|
@@ -53,6 +54,23 @@ export interface ISentenceId {
|
|
|
wordStart: number;
|
|
wordStart: number;
|
|
|
wordEnd: number;
|
|
wordEnd: number;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+export const toISentence = (apiData: ISentenceData): ISentence => ({
|
|
|
|
|
+ id: apiData.id,
|
|
|
|
|
+ content: apiData.content,
|
|
|
|
|
+ html: apiData.html,
|
|
|
|
|
+ book: apiData.book,
|
|
|
|
|
+ para: apiData.paragraph,
|
|
|
|
|
+ wordStart: apiData.word_start,
|
|
|
|
|
+ wordEnd: apiData.word_end,
|
|
|
|
|
+ editor: apiData.editor,
|
|
|
|
|
+ channel: apiData.channel,
|
|
|
|
|
+ updateAt: apiData.updated_at,
|
|
|
|
|
+ acceptor: apiData.acceptor,
|
|
|
|
|
+ prEditAt: apiData.pr_edit_at,
|
|
|
|
|
+ forkAt: apiData.fork_at,
|
|
|
|
|
+ suggestionCount: apiData.suggestionCount,
|
|
|
|
|
+});
|
|
|
export interface IWidgetSentEditInner {
|
|
export interface IWidgetSentEditInner {
|
|
|
id: string;
|
|
id: string;
|
|
|
book: number;
|
|
book: number;
|