Skip to content
Snippets Groups Projects
Unverified Commit c58567cd authored by Henrique Guimarães Ribeiro's avatar Henrique Guimarães Ribeiro Committed by GitHub
Browse files

Regression: Admin menu apps option not working (#27422)

parent 5ec5b2c6
No related branches found
No related tags found
No related merge requests found
......@@ -15,9 +15,19 @@ const AppsRoute = (): ReactElement => {
const appsWhatIsItRoute = useRoute('admin-apps-disabled');
const marketplaceRoute = useRoute('admin-marketplace');
const context = useRouteParameter('context');
const id = useRouteParameter('id');
const page = useRouteParameter('page');
const isMarketplace = !context;
useEffect(() => {
let mounted = true;
if (!context) {
marketplaceRoute.replace({ context: 'all', page: 'list' });
}
const initialize = async (): Promise<void> => {
if (!canManageApps) {
return;
......@@ -40,14 +50,7 @@ const AppsRoute = (): ReactElement => {
return (): void => {
mounted = false;
};
}, [canManageApps, isAppsEngineEnabled, appsWhatIsItRoute, marketplaceRoute]);
const context = useRouteParameter('context');
const isMarketplace = !context;
const id = useRouteParameter('id');
const page = useRouteParameter('page');
}, [canManageApps, isAppsEngineEnabled, appsWhatIsItRoute, marketplaceRoute, context]);
if (!canManageApps) {
return <NotAuthorizedPage />;
......
......@@ -24,13 +24,6 @@ registerAdminRoute('/apps/what-is-it', {
registerAdminRoute('/marketplace/:context?/:page?/:id?/:version?/:tab?', {
name: 'admin-marketplace',
component: lazy(() => import('./apps/AppsRoute')),
triggersEnter: [
(context, redirect): void => {
if (!context.params.context) {
redirect('/admin/marketplace/all/list');
}
},
],
});
registerAdminRoute('/info', {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment