-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f17338
commit 88b54b3
Showing
15 changed files
with
997 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 2 additions & 44 deletions
46
app/layout/project/sidebar/scenario/grid-setup/features/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,7 @@ | ||
import { useRouter } from 'next/router'; | ||
|
||
import { TABS } from 'layout/project/navigation/constants'; | ||
import StepManager from 'layout/step-manager'; | ||
|
||
import GridSetupFeaturesAdd from './add'; | ||
import GridSetupFeaturesTargets from './targets'; | ||
import GridSetupFeaturesTargets from './target-spf'; | ||
|
||
export const GridSetupFeatures = (): JSX.Element => { | ||
const { replace, query } = useRouter(); | ||
const { pid, sid, tab } = query as { pid: string; sid: string; tab: string }; | ||
|
||
return ( | ||
<StepManager defaultStep={tab === TABS['scenario-features-targets-spf'] ? 1 : 0}> | ||
{({ currentStep, onChangeStep }) => ( | ||
<> | ||
{currentStep === 0 && ( | ||
<GridSetupFeaturesAdd | ||
onContinue={() => { | ||
onChangeStep(1); | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
replace( | ||
`/projects/${pid}/scenarios/${sid}/edit?tab=${TABS['scenario-features-targets-spf']}`, | ||
null, | ||
{ shallow: true } | ||
); | ||
}} | ||
/> | ||
)} | ||
{currentStep === 1 && ( | ||
<GridSetupFeaturesTargets | ||
onGoBack={() => { | ||
onChangeStep(0); | ||
// eslint-disable-next-line @typescript-eslint/no-floating-promises | ||
replace( | ||
`/projects/${pid}/scenarios/${sid}/edit?tab=${TABS['scenario-features']}`, | ||
null, | ||
{ shallow: true } | ||
); | ||
}} | ||
/> | ||
)} | ||
</> | ||
)} | ||
</StepManager> | ||
); | ||
return <GridSetupFeaturesTargets />; | ||
}; | ||
|
||
export default GridSetupFeatures; |
Oops, something went wrong.