0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

fix(console): navigate to new connector details page after switching connector

This commit is contained in:
Charles Zhao 2022-07-15 17:37:56 +08:00
parent 6ae5e7d927
commit 1615e36f37
No known key found for this signature in database
GPG key ID: 4858774754C92DF2
2 changed files with 4 additions and 3 deletions

View file

@ -156,8 +156,9 @@ const ConnectorDetails = () => {
<CreateForm
isOpen={isSetupOpen}
type={data.type}
onClose={() => {
onClose={(connectorId?: string) => {
setIsSetupOpen(false);
navigate(`/connectors/${connectorId ?? ''}`);
}}
/>
</div>

View file

@ -16,7 +16,7 @@ import * as styles from './index.module.scss';
type Props = {
isOpen: boolean;
type?: ConnectorType;
onClose?: () => void;
onClose?: (connectorId?: string) => void;
};
const CreateForm = ({ onClose, isOpen: isFormOpen, type }: Props) => {
@ -73,7 +73,7 @@ const CreateForm = ({ onClose, isOpen: isFormOpen, type }: Props) => {
const closeModal = () => {
setIsGetStartedModalOpen(false);
onClose?.();
onClose?.(activeConnectorId);
};
return (