From aef51fd85abef4a388450534c78cb8e378c217d2 Mon Sep 17 00:00:00 2001 From: vmonakhov Date: Sun, 1 Sep 2024 00:38:02 +0300 Subject: [PATCH] cleanup --- src/pages/ListCognates/index.js | 33 ++++++++------------------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/src/pages/ListCognates/index.js b/src/pages/ListCognates/index.js index 46473e49..5975cf60 100644 --- a/src/pages/ListCognates/index.js +++ b/src/pages/ListCognates/index.js @@ -9,27 +9,10 @@ import TranslationContext from "Layout/TranslationContext"; const perspectivesTreeQuery = gql` query PerspectivesTree ( $onlyInToc: Boolean! - ) { - languages( - only_in_toc: $onlyInToc - only_with_dictionaries_recursive: true - in_tree_order: true - ) { - id - parent_id - translations - dictionaries(deleted: false, published: true) { - id - translations - perspectives { - id - translations - lexical_entries(mode: "published") { - entities(mode: "published", xfields: true) { - content - } - } - } + ) { + lexicalentry { + entities(mode: "published", xfields: true, only_in_toc: $onlyInToc) { + content } } } @@ -80,7 +63,7 @@ const ListCognates = ({user}) => { /> - { error && !cleanResult( + { error && !cleanResult && ( {getTranslation("Request error")}

@@ -95,11 +78,11 @@ const ListCognates = ({user}) => {

{error.message}

)} - { data && !error && !cleanResult ( + { data && !error && !cleanResult && ( {getTranslation("Scanned successfully")} -

{data.languages.length}

-

{JSON.stringify(data.languages)}

+

{data.entities.length}

+

{JSON.stringify(data.entities)}

)}