From 80015f22fd0de6ff1935aca66f8f194e883b27a6 Mon Sep 17 00:00:00 2001 From: Charles Zhao Date: Mon, 20 Mar 2023 22:46:48 +0800 Subject: [PATCH] fix(console): the mysterious smog should disappear after creating M2M app (#3553) --- packages/console/src/pages/Applications/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/console/src/pages/Applications/index.tsx b/packages/console/src/pages/Applications/index.tsx index 91d4d323d..ea329a936 100644 --- a/packages/console/src/pages/Applications/index.tsx +++ b/packages/console/src/pages/Applications/index.tsx @@ -1,4 +1,5 @@ import type { Application } from '@logto/schemas'; +import { ApplicationType } from '@logto/schemas'; import { useCallback } from 'react'; import { useTranslation } from 'react-i18next'; import { useLocation, useNavigate } from 'react-router-dom'; @@ -128,7 +129,12 @@ function Applications() { isOpen={isShowingCreationForm} onClose={async (newApp) => { if (newApp) { - navigate(buildGuidePathname(newApp.id), { replace: true }); + const buildNavigatePath = + newApp.type === ApplicationType.MachineToMachine + ? buildDetailsPathname + : buildGuidePathname; + + navigate(buildNavigatePath(newApp.id), { replace: true }); return; }