@@ -311,48 +311,67 @@ export default function DrawerAppBar(): React.ReactElement {
311311 </ Button >
312312 </ Link >
313313 ) ) }
314- { config . gbfsValidator && (
315- < Box
316- component = 'span'
317- onMouseEnter = { handleValidatorOpen }
318- onMouseLeave = { handleValidatorClose }
319- sx = { { display : 'inline-flex' } }
314+
315+ < Box
316+ component = 'span'
317+ onMouseEnter = { handleValidatorOpen }
318+ onMouseLeave = { handleValidatorClose }
319+ sx = { { display : 'inline-flex' } }
320+ >
321+ < Button
322+ aria-controls = 'validator-menu'
323+ aria-haspopup = 'true'
324+ aria-expanded = { validatorAnchorEl !== null }
325+ endIcon = { < ArrowDropDownIcon /> }
326+ sx = { ( theme ) => ( {
327+ ...animatedButtonStyling ( theme ) ,
328+ color : theme . palette . text . primary ,
329+ } ) }
330+ className = {
331+ activeTab . includes ( 'validator' ) ? 'active short' : ''
332+ }
320333 >
321- < Button
322- aria-controls = 'validator-menu'
323- aria-haspopup = 'true'
324- aria-expanded = { validatorAnchorEl !== null }
325- endIcon = { < ArrowDropDownIcon /> }
326- sx = { ( theme ) => ( {
327- ...animatedButtonStyling ( theme ) ,
328- color : theme . palette . text . primary ,
329- } ) }
330- className = {
331- activeTab . includes ( 'validator' ) ? 'active short' : ''
332- }
333- >
334- { tCommon ( 'validators' ) }
335- </ Button >
336- < Menu
337- id = 'validator-menu'
338- anchorEl = { validatorAnchorEl }
339- open = { validatorAnchorEl !== null }
340- onClose = { ( ) => {
341- setValidatorAnchorEl ( null ) ;
342- } }
343- disableScrollLock
344- disableRestoreFocus
345- sx = { { pointerEvents : 'none' } }
346- slotProps = { {
347- paper : {
348- onMouseEnter : ( ) => {
349- clearTimeout ( validatorCloseTimer . current ) ;
350- } ,
351- onMouseLeave : handleValidatorClose ,
352- sx : { pointerEvents : 'auto' } ,
334+ { tCommon ( 'validators' ) }
335+ </ Button >
336+ < Menu
337+ id = 'validator-menu'
338+ anchorEl = { validatorAnchorEl }
339+ open = { validatorAnchorEl !== null }
340+ onClose = { ( ) => {
341+ setValidatorAnchorEl ( null ) ;
342+ } }
343+ disableScrollLock
344+ disableRestoreFocus
345+ sx = { { pointerEvents : 'none' } }
346+ slotProps = { {
347+ paper : {
348+ onMouseEnter : ( ) => {
349+ clearTimeout ( validatorCloseTimer . current ) ;
353350 } ,
354- } }
351+ onMouseLeave : handleValidatorClose ,
352+ sx : { pointerEvents : 'auto' } ,
353+ } ,
354+ } }
355+ >
356+ < MenuItem
357+ component = { 'a' }
358+ href = 'https://gtfs-validator.mobilitydata.org/'
359+ target = '_blank'
360+ rel = 'noopener noreferrer'
355361 >
362+ { tCommon ( 'gtfsValidator' ) }
363+ < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
364+ </ MenuItem >
365+ < MenuItem
366+ component = { 'a' }
367+ href = 'https://github.com/MobilityData/gtfs-realtime-validator'
368+ target = '_blank'
369+ rel = 'noopener noreferrer'
370+ >
371+ { tCommon ( 'gtfsRtValidator' ) }
372+ < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
373+ </ MenuItem >
374+ { config . gbfsValidator ? (
356375 < MenuItem
357376 onClick = { ( ) => {
358377 setValidatorAnchorEl ( null ) ;
@@ -361,27 +380,20 @@ export default function DrawerAppBar(): React.ReactElement {
361380 >
362381 { tCommon ( 'gbfsValidator' ) }
363382 </ MenuItem >
383+ ) : (
364384 < MenuItem
365385 component = { 'a' }
366- href = 'https://gtfs -validator.mobilitydata.org/'
386+ href = 'https://gbfs -validator.mobilitydata.org/'
367387 target = '_blank'
368388 rel = 'noopener noreferrer'
369389 >
370- { tCommon ( 'gtfsValidator' ) }
371- < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
372- </ MenuItem >
373- < MenuItem
374- component = { 'a' }
375- href = 'https://github.com/MobilityData/gtfs-realtime-validator'
376- target = '_blank'
377- rel = 'noopener noreferrer'
378- >
379- { tCommon ( 'gtfsRtValidator' ) }
390+ { tCommon ( 'gbfsValidator' ) }
380391 < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
381392 </ MenuItem >
382- </ Menu >
383- </ Box >
384- ) }
393+ ) }
394+ </ Menu >
395+ </ Box >
396+
385397 { isAuthenticated ? (
386398 < Box
387399 component = 'span'
0 commit comments