@@ -14,11 +14,12 @@ import { Location, Route, useLocation } from 'react-router-dom'
1414import { authUrlLogin } from '../functions'
1515import { LoadingSpinner } from '../loading-spinner'
1616import { profileContext , ProfileContextData } from '../profile-provider'
17+ import { EnvironmentConfig } from '../../config'
1718
1819import { PlatformRoute } from './platform-route.model'
1920import { RequireAuthProvider } from './require-auth-provider'
2021import { RouteContextData } from './route-context-data.model'
21- import { routeGetActive , routeGetSignupUrl } from './route-functions'
22+ import { routeGetActive , routeGetSignupUrl , routeMatchAppRouter } from './route-functions'
2223import { default as routeContext , defaultRouteContextData } from './route.context'
2324
2425interface RouteProviderProps {
@@ -53,7 +54,13 @@ export const RouteProvider: FC<RouteProviderProps> = (props: RouteProviderProps)
5354 ...utilsRoutes ,
5455 ]
5556
56- const activeRoute : PlatformRoute | undefined = routeGetActive ( location . pathname , allRoutes )
57+ let activeRoute : PlatformRoute | undefined = routeGetActive ( location . pathname , allRoutes )
58+ const matchedAppRouter : PlatformRoute | undefined = routeMatchAppRouter ( EnvironmentConfig . SUBDOMAIN , allRoutes )
59+
60+ if ( matchedAppRouter ) {
61+ allRoutes = [ matchedAppRouter ]
62+ activeRoute = matchedAppRouter
63+ }
5764
5865 // TODO: support additional roles and landing pages
5966 const loggedInRoot : string = ! profile
0 commit comments