fix: set base-path manually (#50773)

In case we didn't set a `basePath`, `<AppPluginLoader>` would always use the current path as a `basePath`.
This can get problematic in case the Cloud Onboarding app tries to handle it's own sub-routes.
This commit is contained in:
Levente Balogh 2022-06-14 14:29:55 +02:00 committed by GitHub
parent c581f6d945
commit b184280cb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,14 +5,14 @@ import { GrafanaTheme2 } from '@grafana/data';
import { useStyles2 } from '@grafana/ui';
import { AppPluginLoader } from 'app/features/plugins/components/AppPluginLoader';
import { CLOUD_ONBOARDING_APP_ID } from '../../constants';
import { CLOUD_ONBOARDING_APP_ID, ROUTES } from '../../constants';
export function CloudIntegrations(): ReactElement | null {
const s = useStyles2(getStyles);
return (
<div className={s.container}>
<AppPluginLoader id={CLOUD_ONBOARDING_APP_ID} />
<AppPluginLoader id={CLOUD_ONBOARDING_APP_ID} basePath={ROUTES.CloudIntegrations} />
</div>
);
}