File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ export const UploadSelectPage = () => {
2727 < PageHeader >
2828 < Heading className = "text-center" variant = "h2" >
2929 { t ( {
30- en : 'Select Instrument (Feature in Beta )' ,
31- fr : 'Selectionnez un instrument (Fonctionnalité en bêta )'
30+ en : 'Select Instrument (Experimental Feature )' ,
31+ fr : 'Selectionnez un instrument (Fonctionnalité expérimentale )'
3232 } ) }
3333 </ Heading >
3434 </ PageHeader >
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ import {
1515
1616import { useAppStore } from '@/store' ;
1717
18+ import { useSetupState } from './useSetupState' ;
19+
1820export type NavItem = {
1921 disabled ?: boolean ;
2022 icon : React . ComponentType < Omit < React . SVGProps < SVGSVGElement > , 'ref' > > ;
@@ -34,6 +36,7 @@ export function useNavItems() {
3436 const currentUser = useAppStore ( ( store ) => store . currentUser ) ;
3537 const [ navItems , setNavItems ] = useState < NavItem [ ] [ ] > ( [ [ ] , [ ] ] ) ;
3638 const { resolvedLanguage, t } = useTranslation ( ) ;
39+ const setupState = useSetupState ( ) ;
3740
3841 useEffect ( ( ) => {
3942 const globalItems : NavItem [ ] = [ ] ;
@@ -51,7 +54,11 @@ export function useNavItems() {
5154 url : '/datahub'
5255 } ) ;
5356 }
54- if ( currentUser ?. ability . can ( 'read' , 'Subject' ) && currentUser . ability . can ( 'create' , 'InstrumentRecord' ) ) {
57+ if (
58+ currentUser ?. ability . can ( 'read' , 'Subject' ) &&
59+ currentUser . ability . can ( 'create' , 'InstrumentRecord' ) &&
60+ setupState . data ?. isExperimentalFeaturesEnabled
61+ ) {
5562 globalItems . push ( {
5663 icon : UploadIcon ,
5764 label : t ( `layout.navLinks.upload` ) ,
Original file line number Diff line number Diff line change 5151 "fr" : " Centre de données"
5252 },
5353 "upload" : {
54- "en" : " Upload Data (Beta) " ,
55- "fr" : " Téléverser les données (Beta) "
54+ "en" : " Upload Data" ,
55+ "fr" : " Téléverser les données"
5656 },
5757 "endSession" : {
5858 "en" : " End Current Session" ,
You can’t perform that action at this time.
0 commit comments