Skip to content

Commit

Permalink
currentStep correctly restores place (#15600)
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaglick authored Aug 12, 2022
1 parent 7a7e78f commit 12a76fa
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ export const CreationFormPage: React.FC = () => {
? EntityStepsTypes.DESTINATION
: EntityStepsTypes.SOURCE;

const hasConnectors = hasSourceId(location.state) && hasDestinationId(location.state);
const [currentStep, setCurrentStep] = useState(
hasConnectors ? StepsTypes.CREATE_CONNECTION : StepsTypes.CREATE_ENTITY
hasSourceId(location.state) && hasDestinationId(location.state)
? StepsTypes.CREATE_CONNECTION
: hasSourceId(location.state) && !hasDestinationId(location.state)
? StepsTypes.CREATE_CONNECTOR
: StepsTypes.CREATE_ENTITY
);

const [currentEntityStep, setCurrentEntityStep] = useState(
Expand Down

0 comments on commit 12a76fa

Please sign in to comment.