0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2025-01-27 21:39:16 -05:00

Merge pull request #1557 from logto-io/charles-log-3725-fix-routing-issue-after-switching-connector

fix(console): navigate to new connector details page after switching connector
This commit is contained in:
Charles Zhao 2022-07-15 17:47:02 +08:00 committed by GitHub
commit c90d2ceb32
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

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

View file

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