diff --git a/screen2.0/src/app/header.tsx b/screen2.0/src/app/header.tsx index 5dacdc85..dce5d8ec 100644 --- a/screen2.0/src/app/header.tsx +++ b/screen2.0/src/app/header.tsx @@ -8,6 +8,7 @@ import Link from "next/link" import Image from "next/image" import screenIcon from "../../public/screenLogo.png" import { MainSearch } from "./_mainsearch/mainsearch" +import { A } from "logots-react" /* @@ -89,9 +90,9 @@ function ResponsiveAppBar() { {/* Logo, and desktop navigation */} - + SCREEN Icon - + {/* Main navigation items for desktop, hide on small screen size */} {pageLinks.map((page) => ( @@ -107,11 +108,11 @@ function ResponsiveAppBar() { onMouseEnter={page.subPages ? (event) => handleOpenNavMenu_Dropdown(event, page.dropdownID) : undefined} > {/* Wrap in next/link to enable dyanic link changing from basePath in next.config.js */} - + {page.pageName} - + {/* Create popup menu if page has subpages */} {page.subPages && ( @@ -141,9 +142,9 @@ function ResponsiveAppBar() { page.subPages.map((subPage) => ( handleCloseNavMenu_Dropdown(page.dropdownID)}> {/* Wrap in next/link to enable dyanic link changing from basePath in next.config.js */} - + {subPage.pageName} - + ))} @@ -192,9 +193,9 @@ function ResponsiveAppBar() { {pageLinks.map((page) => ( - + {page.pageName} - + ))} diff --git a/screen2.0/src/common/lib/queries.ts b/screen2.0/src/common/lib/queries.ts index 32b88ee8..47686a27 100644 --- a/screen2.0/src/common/lib/queries.ts +++ b/screen2.0/src/common/lib/queries.ts @@ -120,11 +120,10 @@ const cCRE_QUERY = gql` } ` -function cCRE_QUERY_VARIABLES(assembly: string, chromosome: string, start: number, end: number, biosample: string, nearbygenesdistancethreshold: number, nearbygeneslimit: number, accessions: string[], noLimit?: boolean) { +function cCRE_QUERY_VARIABLES(assembly: string, coordinates: {chromosome: string, start: number, end: number}[], biosample: string, nearbygenesdistancethreshold: number, nearbygeneslimit: number, accessions: string[], noLimit?: boolean) { let vars = { uuid: null, assembly: assembly, - coordinates: [{chromosome, start, end}], gene_all_start: 0, gene_all_end: 5000000, gene_pc_start: 0, @@ -149,6 +148,9 @@ function cCRE_QUERY_VARIABLES(assembly: string, chromosome: string, start: numbe if (accessions) { vars["accessions"] = accessions } + if (coordinates) { + vars["coordinates"] = coordinates + } return vars } @@ -259,7 +261,7 @@ export async function MainQuery(assembly: string = null, chromosome: string = nu try { data = await getClient().query({ query: cCRE_QUERY, - variables: cCRE_QUERY_VARIABLES(assembly, chromosome, start, end, biosample, nearbygenesdistancethreshold, nearbygeneslimit, accessions, noLimit), + variables: cCRE_QUERY_VARIABLES(assembly, chromosome ? [{chromosome, start, end}] : null, biosample, nearbygenesdistancethreshold, nearbygeneslimit, accessions, noLimit), //Telling it to not cache, next js caches also and for things that exceed the 2mb cache limit it slows down substantially for some reason fetchPolicy: "no-cache", })