Skip to content

Commit

Permalink
[Platform]: fix gql playground for studies widget on disease page (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
gjmcn authored Dec 10, 2024
1 parent ce61cfa commit e411c1b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/sections/src/disease/GWASStudies/Body.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { getStudyCategory } from "../../utils/getStudyCategory";
import GWAS_STUDIES_BODY_QUERY from "./GWASStudiesQuery.gql";
import { definition } from ".";
import { epmcUrl } from "ui/src/utils/urls";
import { useEffect, useState } from "react";
import { ReactElement, useEffect, useState } from "react";
import { responseType } from "ui/src/types/response";

const columns = [
Expand Down Expand Up @@ -116,20 +116,18 @@ type BodyProps = {
label: string;
};

function Body({ id: efoId, label: diseaseName }: BodyProps) {
function Body({ id: efoId, label: diseaseName }: BodyProps): ReactElement {
const variables = {
diseaseIds: [efoId],
size: table5HChunkSize,
index: 0,
};

const [request, setRequest] = useState<responseType>(initialResponse);

const getData = useBatchQuery({
query: GWAS_STUDIES_BODY_QUERY,
variables: {
diseaseIds: variables.diseaseIds,
size: table5HChunkSize,
index: 0,
},
variables,
dataPath: "data.studies",
size: table5HChunkSize,
});
Expand Down

0 comments on commit e411c1b

Please sign in to comment.