Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
vmonakhov committed Aug 31, 2024
1 parent 5e17a8e commit aef51fd
Showing 1 changed file with 8 additions and 25 deletions.
33 changes: 8 additions & 25 deletions src/pages/ListCognates/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}
Expand Down Expand Up @@ -80,7 +63,7 @@ const ListCognates = ({user}) => {
/>
</List.Item>
</List>
{ error && !cleanResult(
{ error && !cleanResult && (
<Message negative>
<Message.Header>{getTranslation("Request error")}</Message.Header>
<p>
Expand All @@ -95,11 +78,11 @@ const ListCognates = ({user}) => {
<p> {error.message} </p>
</Message>
)}
{ data && !error && !cleanResult (
{ data && !error && !cleanResult && (
<Message positive>
<Message.Header>{getTranslation("Scanned successfully")}</Message.Header>
<p> {data.languages.length} </p>
<p> {JSON.stringify(data.languages)} </p>
<p> {data.entities.length} </p>
<p> {JSON.stringify(data.entities)} </p>
</Message>
)}
</Segment>
Expand Down

0 comments on commit aef51fd

Please sign in to comment.