@@ -30,7 +30,7 @@ import {
3030 MODES ,
3131 DEVTRON_BASE_MAIN_ID ,
3232} from '@devtron-labs/devtron-fe-common-lib'
33- import { Route , Switch , useRouteMatch , useHistory , useLocation , Redirect } from 'react-router-dom'
33+ import { Route , Switch , useRouteMatch , useHistory , useLocation } from 'react-router-dom'
3434import * as Sentry from '@sentry/browser'
3535import ReactGA from 'react-ga4'
3636import TagManager from 'react-gtm-module'
@@ -384,6 +384,7 @@ export default function NavigationRoutes() {
384384 < main className = { _isOnboardingPage ? 'no-nav' : '' } id = { DEVTRON_BASE_MAIN_ID } >
385385 { ! _isOnboardingPage && (
386386 < Navigation
387+ currentServerInfo = { currentServerInfo }
387388 history = { history }
388389 match = { match }
389390 location = { location }
@@ -421,7 +422,6 @@ export default function NavigationRoutes() {
421422 isSuperAdmin = { isSuperAdmin }
422423 appListCount = { appListCount }
423424 loginCount = { loginCount }
424- serverMode = { serverMode }
425425 />
426426 ) }
427427 /> ,
@@ -482,7 +482,7 @@ export default function NavigationRoutes() {
482482 </ Route > ,
483483 ]
484484 : [ ] ) ,
485- ...( serverMode !== SERVER_MODE . EA_ONLY
485+ ...( serverMode !== SERVER_MODE . EA_ONLY || currentServerInfo . serverInfo ?. installationType !== 'enterprise'
486486 ? [
487487 < Route key = { URLS . STACK_MANAGER } path = { URLS . STACK_MANAGER } >
488488 < DevtronStackManager
@@ -525,7 +525,7 @@ export default function NavigationRoutes() {
525525 )
526526}
527527
528- export const AppRouter = ( { isSuperAdmin, appListCount, loginCount, serverMode } : AppRouterType ) => {
528+ export const AppRouter = ( { isSuperAdmin, appListCount, loginCount } : AppRouterType ) => {
529529 const { path } = useRouteMatch ( )
530530 const [ environmentId , setEnvironmentId ] = useState ( null )
531531 const [ currentAppName , setCurrentAppName ] = useState < string > ( '' )
@@ -541,7 +541,6 @@ export const AppRouter = ({ isSuperAdmin, appListCount, loginCount, serverMode }
541541 isSuperAdmin = { isSuperAdmin }
542542 appListCount = { appListCount }
543543 loginCount = { loginCount }
544- serverMode = { serverMode }
545544 />
546545 ) }
547546 />
@@ -563,11 +562,7 @@ export const AppRouter = ({ isSuperAdmin, appListCount, loginCount, serverMode }
563562 < Route path = { `${ path } /v2/:appId(\\d+)` } render = { ( ) => < AppDetailsPage isV2 /> } />
564563
565564 < Route exact path = "" >
566- { serverMode === SERVER_MODE . EA_ONLY ? (
567- < Redirect to = { URLS . RESOURCE_BROWSER } />
568- ) : (
569- < RedirectToAppList />
570- ) }
565+ < RedirectToAppList />
571566 </ Route >
572567 < Route >
573568 < RedirectUserWithSentry
@@ -580,21 +575,17 @@ export const AppRouter = ({ isSuperAdmin, appListCount, loginCount, serverMode }
580575 )
581576}
582577
583- export const AppListRouter = ( { isSuperAdmin, appListCount, loginCount, serverMode } : AppRouterType ) => {
578+ export const AppListRouter = ( { isSuperAdmin, appListCount, loginCount } : AppRouterType ) => {
584579 const { path } = useRouteMatch ( )
585580 const [ , argoInfoData ] = useAsync ( ( ) => getModuleInfo ( ModuleNameMap . ARGO_CD ) )
586581 const isArgoInstalled : boolean = argoInfoData ?. result ?. status === ModuleStatus . INSTALLED
587582
588583 return (
589584 < ErrorBoundary >
590585 < Switch >
591- < Route exact path = { `${ path } /:appType` } render = { ( ) => < NewAppList isArgoInstalled = { isArgoInstalled } /> } />
586+ < Route path = { `${ path } /:appType` } render = { ( ) => < NewAppList isArgoInstalled = { isArgoInstalled } /> } />
592587 < Route exact path = "" >
593- { serverMode === SERVER_MODE . EA_ONLY ? (
594- < Redirect to = { URLS . RESOURCE_BROWSER } />
595- ) : (
596- < RedirectToAppList />
597- ) }
588+ < RedirectToAppList />
598589 </ Route >
599590 < Route >
600591 < RedirectUserWithSentry isFirstLoginUser = { isSuperAdmin && loginCount === 0 && appListCount === 0 } />
@@ -624,6 +615,8 @@ export const RedirectUserWithSentry = ({ isFirstLoginUser }) => {
624615 push ( URLS . RESOURCE_BROWSER )
625616 } else if ( isFirstLoginUser ) {
626617 push ( URLS . GETTING_STARTED )
618+ } else if ( window . _env_ . FEATURE_DEFAULT_LANDING_RB_ENABLE ) {
619+ push ( URLS . RESOURCE_BROWSER )
627620 } else {
628621 push ( `${ URLS . APP } /${ URLS . APP_LIST } ` )
629622 }
0 commit comments