mirror of
https://github.com/logto-io/logto.git
synced 2024-12-16 20:26:19 -05:00
fix(console): the mysterious smog should disappear after creating M2M app (#3553)
This commit is contained in:
parent
415c2fab23
commit
80015f22fd
1 changed files with 7 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue