@@ -286,48 +286,67 @@ export default function DrawerAppBar(): React.ReactElement {
286286 </ Button >
287287 </ Link >
288288 ) ) }
289- { config . gbfsValidator && (
290- < Box
291- component = 'span'
292- onMouseEnter = { handleValidatorOpen }
293- onMouseLeave = { handleValidatorClose }
294- sx = { { display : 'inline-flex' } }
289+
290+ < Box
291+ component = 'span'
292+ onMouseEnter = { handleValidatorOpen }
293+ onMouseLeave = { handleValidatorClose }
294+ sx = { { display : 'inline-flex' } }
295+ >
296+ < Button
297+ aria-controls = 'validator-menu'
298+ aria-haspopup = 'true'
299+ aria-expanded = { validatorAnchorEl !== null }
300+ endIcon = { < ArrowDropDownIcon /> }
301+ sx = { ( theme ) => ( {
302+ ...animatedButtonStyling ( theme ) ,
303+ color : theme . palette . text . primary ,
304+ } ) }
305+ className = {
306+ activeTab . includes ( 'validator' ) ? 'active short' : ''
307+ }
295308 >
296- < Button
297- aria-controls = 'validator-menu'
298- aria-haspopup = 'true'
299- aria-expanded = { validatorAnchorEl !== null }
300- endIcon = { < ArrowDropDownIcon /> }
301- sx = { ( theme ) => ( {
302- ...animatedButtonStyling ( theme ) ,
303- color : theme . palette . text . primary ,
304- } ) }
305- className = {
306- activeTab . includes ( 'validator' ) ? 'active short' : ''
307- }
308- >
309- { tCommon ( 'validators' ) }
310- </ Button >
311- < Menu
312- id = 'validator-menu'
313- anchorEl = { validatorAnchorEl }
314- open = { validatorAnchorEl !== null }
315- onClose = { ( ) => {
316- setValidatorAnchorEl ( null ) ;
317- } }
318- disableScrollLock
319- disableRestoreFocus
320- sx = { { pointerEvents : 'none' } }
321- slotProps = { {
322- paper : {
323- onMouseEnter : ( ) => {
324- clearTimeout ( validatorCloseTimer . current ) ;
325- } ,
326- onMouseLeave : handleValidatorClose ,
327- sx : { pointerEvents : 'auto' } ,
309+ { tCommon ( 'validators' ) }
310+ </ Button >
311+ < Menu
312+ id = 'validator-menu'
313+ anchorEl = { validatorAnchorEl }
314+ open = { validatorAnchorEl !== null }
315+ onClose = { ( ) => {
316+ setValidatorAnchorEl ( null ) ;
317+ } }
318+ disableScrollLock
319+ disableRestoreFocus
320+ sx = { { pointerEvents : 'none' } }
321+ slotProps = { {
322+ paper : {
323+ onMouseEnter : ( ) => {
324+ clearTimeout ( validatorCloseTimer . current ) ;
328325 } ,
329- } }
326+ onMouseLeave : handleValidatorClose ,
327+ sx : { pointerEvents : 'auto' } ,
328+ } ,
329+ } }
330+ >
331+ < MenuItem
332+ component = { 'a' }
333+ href = 'https://gtfs-validator.mobilitydata.org/'
334+ target = '_blank'
335+ rel = 'noopener noreferrer'
330336 >
337+ { tCommon ( 'gtfsValidator' ) }
338+ < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
339+ </ MenuItem >
340+ < MenuItem
341+ component = { 'a' }
342+ href = 'https://github.com/MobilityData/gtfs-realtime-validator'
343+ target = '_blank'
344+ rel = 'noopener noreferrer'
345+ >
346+ { tCommon ( 'gtfsRtValidator' ) }
347+ < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
348+ </ MenuItem >
349+ { config . gbfsValidator ? (
331350 < MenuItem
332351 onClick = { ( ) => {
333352 setValidatorAnchorEl ( null ) ;
@@ -336,27 +355,20 @@ export default function DrawerAppBar(): React.ReactElement {
336355 >
337356 { tCommon ( 'gbfsValidator' ) }
338357 </ MenuItem >
358+ ) : (
339359 < MenuItem
340360 component = { 'a' }
341- href = 'https://gtfs -validator.mobilitydata.org/'
361+ href = 'https://gbfs -validator.mobilitydata.org/'
342362 target = '_blank'
343363 rel = 'noopener noreferrer'
344364 >
345- { tCommon ( 'gtfsValidator' ) }
346- < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
347- </ MenuItem >
348- < MenuItem
349- component = { 'a' }
350- href = 'https://github.com/MobilityData/gtfs-realtime-validator'
351- target = '_blank'
352- rel = 'noopener noreferrer'
353- >
354- { tCommon ( 'gtfsRtValidator' ) }
365+ { tCommon ( 'gbfsValidator' ) }
355366 < OpenInNew fontSize = 'small' sx = { { ml : 0.5 } } />
356367 </ MenuItem >
357- </ Menu >
358- </ Box >
359- ) }
368+ ) }
369+ </ Menu >
370+ </ Box >
371+
360372 { isAuthenticated ? (
361373 < Box
362374 component = 'span'
0 commit comments