Skip to content

Commit 12a76fa

Browse files
authored
currentStep correctly restores place (#15600)
1 parent 7a7e78f commit 12a76fa

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

airbyte-webapp/src/pages/ConnectionPage/pages/CreationFormPage/CreationFormPage.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ export const CreationFormPage: React.FC = () => {
8383
? EntityStepsTypes.DESTINATION
8484
: EntityStepsTypes.SOURCE;
8585

86-
const hasConnectors = hasSourceId(location.state) && hasDestinationId(location.state);
8786
const [currentStep, setCurrentStep] = useState(
88-
hasConnectors ? StepsTypes.CREATE_CONNECTION : StepsTypes.CREATE_ENTITY
87+
hasSourceId(location.state) && hasDestinationId(location.state)
88+
? StepsTypes.CREATE_CONNECTION
89+
: hasSourceId(location.state) && !hasDestinationId(location.state)
90+
? StepsTypes.CREATE_CONNECTOR
91+
: StepsTypes.CREATE_ENTITY
8992
);
9093

9194
const [currentEntityStep, setCurrentEntityStep] = useState(

0 commit comments

Comments
 (0)