@@ -30,8 +30,6 @@ import { EntityGuard } from "../../app/components/Detail/components/EntityGuard/
3030import { readFile } from "../../app/utils/tsvParser" ;
3131import { useRouter } from "next/router" ;
3232import { useConfig } from "@databiosphere/findable-ui/lib/hooks/useConfig" ;
33- import { useFeatureFlag } from "@databiosphere/findable-ui/lib/hooks/useFeatureFlag/useFeatureFlag" ;
34- import { FEATURES } from "../../app/shared/entities" ;
3533import NextError from "next/error" ;
3634import { ROUTES } from "../../site-config/anvil-cmg/dev/export/routes" ;
3735
@@ -40,12 +38,6 @@ import { DatasetsResponse } from "../../app/apis/azul/anvil-cmg/common/responses
4038
4139const setOfProcessedIds = new Set < string > ( ) ;
4240
43- const NCPI_EXPORT_PATHS = [
44- ROUTES . BIO_DATA_CATALYST ,
45- ROUTES . CANCER_GENOMICS_CLOUD ,
46- ROUTES . CAVATICA ,
47- ] ;
48-
4941const CURL_DOWNLOAD_PATH = ROUTES . CURL_DOWNLOAD ;
5042
5143interface StaticPath {
@@ -71,12 +63,9 @@ export interface EntityDetailPageProps extends AzulEntityStaticResponse {
7163const EntityDetailPage = ( props : EntityDetailPageProps ) : JSX . Element => {
7264 const { config : siteConfig } = useConfig ( ) ;
7365 const isAnVIL = siteConfig . appTitle ?. includes ( "AnVIL" ) ;
74- const isNCPIExportEnabled = useFeatureFlag ( FEATURES . NCPI_EXPORT ) ;
7566 const { query } = useRouter ( ) ;
7667 if ( ! props . entityListType ) return < > </ > ;
7768 if ( props . override ) return < EntityGuard override = { props . override } /> ;
78- if ( ! isNCPIExportEnabled && isNCPIExportRoute ( query ) )
79- return < NextError statusCode = { 404 } /> ;
8069 // Curl download requires NRES consent group (AnVIL only)
8170 if ( isAnVIL && isCurlDownloadRoute ( query ) && ! isNRESDataset ( props . data ) ) {
8271 return < NextError statusCode = { 404 } /> ;
@@ -102,19 +91,6 @@ function findOverride(
10291 return overrides . find ( ( { entryId } ) => entryId === entityId ) ;
10392}
10493
105- /**
106- * Returns true if the current route is an NCPI export route.
107- * @param query - Parsed URL query.
108- * @returns True if the route matches an NCPI export path.
109- */
110- function isNCPIExportRoute ( query : ParsedUrlQuery ) : boolean {
111- const params = query . params as string [ ] | undefined ;
112- const lastParam = params ?. [ params . length - 1 ] || "" ;
113- return NCPI_EXPORT_PATHS . map ( ( path ) => path . replace ( "/export/" , "" ) ) . includes (
114- lastParam
115- ) ;
116- }
117-
11894/**
11995 * Returns true if the current route is a curl download route.
12096 * @param query - Parsed URL query.
0 commit comments