mirror of
https://github.com/logto-io/logto.git
synced 2025-01-06 20:40:08 -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 type { Application } from '@logto/schemas';
|
||||||
|
import { ApplicationType } from '@logto/schemas';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useLocation, useNavigate } from 'react-router-dom';
|
import { useLocation, useNavigate } from 'react-router-dom';
|
||||||
|
@ -128,7 +129,12 @@ function Applications() {
|
||||||
isOpen={isShowingCreationForm}
|
isOpen={isShowingCreationForm}
|
||||||
onClose={async (newApp) => {
|
onClose={async (newApp) => {
|
||||||
if (newApp) {
|
if (newApp) {
|
||||||
navigate(buildGuidePathname(newApp.id), { replace: true });
|
const buildNavigatePath =
|
||||||
|
newApp.type === ApplicationType.MachineToMachine
|
||||||
|
? buildDetailsPathname
|
||||||
|
: buildGuidePathname;
|
||||||
|
|
||||||
|
navigate(buildNavigatePath(newApp.id), { replace: true });
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue