diff --git a/src/taskpane/components/App.tsx b/src/taskpane/components/App.tsx index af12bd8..ef87a16 100644 --- a/src/taskpane/components/App.tsx +++ b/src/taskpane/components/App.tsx @@ -28,17 +28,8 @@ const processFunction = async ( if (!range.isNullObject) { range.insertComment(comment_text + "\n" + "Точность: " + score.toFixed(2)); } - } catch (e) { - // - } - - // return context.document.body - // .search(search_text.slice(0, 255).split("\\").join(""), { - // ignorePunct: true, - // ignoreSpace: true, - // }) - // .getFirst() - // .insertComment(comment_text + "\n" + "Точность: " + score.toFixed(2)); + // eslint-disable-next-line no-empty + } catch (e) {} }; const typeKey: ScoreType = "bert"; @@ -107,13 +98,13 @@ export const App: FC> = () => { } }, [processId, refetchProcess, timeout]); - // const textId = process?.current === process?.total ? process?.texts[0].id : undefined; - const textId = 3184; + const textId = process?.current === process?.total ? process?.texts[0].id : undefined; + // const textId = 3184; const { data: textEntity, isFetching: textFetching, - refetch: refetchText, + // refetch: refetchText, } = useText({ textId: textId || 0, type: typeKey, @@ -156,12 +147,12 @@ export const App: FC> = () => { const documentBody = context.document.body; context.load(documentBody); return context.sync().then(async () => { - await refetchText(); + // await refetchText(); - // const text = documentBody.text; - // await createProcess({ - // text, - // }); + const text = documentBody.text; + await createProcess({ + text, + }); }); }); }, []); diff --git a/src/taskpane/components/HeroList.tsx b/src/taskpane/components/HeroList.tsx deleted file mode 100644 index 21ca3c7..0000000 --- a/src/taskpane/components/HeroList.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import * as React from "react"; - -export interface HeroListItem { - icon: string; - primaryText: string; -} - -export interface HeroListProps { - message: string; - items: HeroListItem[]; - children: any; -} - -export default class HeroList extends React.Component { - render() { - const { children, items, message } = this.props; - - const listItems = items.map((item, index) => ( -
  • - - {item.primaryText} -
  • - )); - return ( -
    -

    {message}

    -
      {listItems}
    - {children} -
    - ); - } -} diff --git a/src/taskpane/components/Progress.tsx b/src/taskpane/components/Progress.tsx deleted file mode 100644 index 823d5cf..0000000 --- a/src/taskpane/components/Progress.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import * as React from "react"; -import { Spinner, SpinnerSize } from "@fluentui/react"; - -export interface ProgressProps { - logo: string; - message: string; - title: string; -} - -export default class Progress extends React.Component { - render() { - const { logo, message, title } = this.props; - - return ( -
    - {title} -

    {title}

    - -
    - ); - } -}