diff --git a/packages/core-app-api/api-report.md b/packages/core-app-api/api-report.md index c07ea55b67..4d867f0b37 100644 --- a/packages/core-app-api/api-report.md +++ b/packages/core-app-api/api-report.md @@ -228,7 +228,13 @@ export type AppRouteBinder = < ) => void; // @public -export function AppRouter({ children }: { children?: ReactNode }): JSX.Element; +export function AppRouter(props: AppRouterProps): JSX.Element; + +// @public +export interface AppRouterProps { + // (undocumented) + children?: ReactNode; +} // @public export class AppThemeSelector implements AppThemeApi { diff --git a/packages/core-app-api/src/app/AppRouter.tsx b/packages/core-app-api/src/app/AppRouter.tsx index c95bdaa7c5..b799983a3b 100644 --- a/packages/core-app-api/src/app/AppRouter.tsx +++ b/packages/core-app-api/src/app/AppRouter.tsx @@ -100,9 +100,8 @@ export interface AppRouterProps { * Until the user has successfully signed in, this component will render * the sign-in page. Once the user has signed-in, it will instead render * the app, while providing routing and route tracking for the app. - * */ -export function AppRouter({ children }: { children?: ReactNode }) { +export function AppRouter(props: AppRouterProps) { const { Router: RouterComponent, SignInPage: SignInPageComponent } = useApp().getComponents(); @@ -145,7 +144,7 @@ export function AppRouter({ children }: { children?: ReactNode }) { - {children}} /> + {props.children}} /> ); @@ -154,7 +153,7 @@ export function AppRouter({ children }: { children?: ReactNode }) { return ( - {children} + {props.children} ); } @@ -168,7 +167,7 @@ export function AppRouter({ children }: { children?: ReactNode }) { appIdentityProxy={appIdentityProxy} > - {children}} /> + {props.children}} /> @@ -182,7 +181,7 @@ export function AppRouter({ children }: { children?: ReactNode }) { component={SignInPageComponent} appIdentityProxy={appIdentityProxy} > - {children} + {props.children} ); diff --git a/packages/core-app-api/src/app/index.ts b/packages/core-app-api/src/app/index.ts index f6289a5830..156c59d0c7 100644 --- a/packages/core-app-api/src/app/index.ts +++ b/packages/core-app-api/src/app/index.ts @@ -15,6 +15,7 @@ */ export { AppRouter } from './AppRouter'; +export type { AppRouterProps } from './AppRouter'; export { createSpecializedApp } from './createSpecializedApp'; export { defaultConfigLoader } from './defaultConfigLoader'; export * from './types';