Skip to content

Commit

Permalink
feat(goannotations.tsx): add NoDataDisplay component to show a messag…
Browse files Browse the repository at this point in the history
…e when there are no gene ontology annotations available

The NoDataDisplay component is added to the OntologyPageWrapper to display a message when the geneOntologyAnnotation data is empty. This provides a better user experience by informing users that there are no gene ontology annotations available for the specific gene.

issue #965
  • Loading branch information
ktun95 committed Feb 4, 2025
1 parent 1b107a1 commit c2c0cd7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions apps/genome-page/pages/[id]/goannotations.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { OntologyContainer } from "components/features/Ontology/OntologyContainer"
import { GraphQLErrorPage } from "components/errors/GraphQLErrorPage"
import { Layout } from "components/layout/Layout"
import { NoDataDisplay } from "components/NoDataDisplay"
import { OntologyLoader } from "components/features/Ontology/OntologyLoader"
import { useRouter } from "next/router"
import { useGeneOntologyAnnotationQuery } from "dicty-graphql-schema"
Expand Down Expand Up @@ -28,6 +29,13 @@ const OntologyPageWrapper = () => {
>

Check failure on line 29 in apps/genome-page/pages/[id]/goannotations.tsx

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

apps/genome-page/pages/[id]/goannotations.tsx#L28-L29

[prettier/prettier] Delete `⏎····`
{match(result)
.with(
{
data: {
geneOntologyAnnotation: [],
},
},
() => <NoDataDisplay query="Go Annotations" geneId={gene} />,
)
.with(
{
data: {
Expand Down

0 comments on commit c2c0cd7

Please sign in to comment.