Skip to content

Commit 3826747

Browse files
committed
feat(manager-dashboard): hide tileserver input for street tutorials
1 parent f057e6f commit 3826747

File tree

1 file changed

+19
-11
lines changed
  • manager-dashboard/app/views/NewTutorial

1 file changed

+19
-11
lines changed

manager-dashboard/app/views/NewTutorial/index.tsx

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -646,6 +646,11 @@ function NewTutorial(props: Props) {
646646
|| tutorialSubmissionStatus === 'tutorialSubmit'
647647
);
648648

649+
const tileServerVisible = value.projectType === PROJECT_TYPE_BUILD_AREA
650+
|| value.projectType === PROJECT_TYPE_FOOTPRINT
651+
|| value.projectType === PROJECT_TYPE_COMPLETENESS
652+
|| value.projectType === PROJECT_TYPE_CHANGE_DETECTION;
653+
649654
const tileServerBVisible = value.projectType === PROJECT_TYPE_CHANGE_DETECTION
650655
|| value.projectType === PROJECT_TYPE_COMPLETENESS;
651656

@@ -900,17 +905,20 @@ function NewTutorial(props: Props) {
900905
)}
901906
</div>
902907
</InputSection>
903-
<InputSection
904-
heading={tileServerBVisible ? 'Tile Server A' : 'Tile Server'}
905-
>
906-
<TileServerInput
907-
name={'tileServer' as const}
908-
value={value.tileServer}
909-
error={error?.tileServer}
910-
onChange={setFieldValue}
911-
disabled={submissionPending || projectTypeEmpty}
912-
/>
913-
</InputSection>
908+
{tileServerVisible && (
909+
<InputSection
910+
heading={tileServerBVisible ? 'Tile Server A' : 'Tile Server'}
911+
>
912+
<TileServerInput
913+
name={'tileServer' as const}
914+
value={value.tileServer}
915+
error={error?.tileServer}
916+
onChange={setFieldValue}
917+
disabled={submissionPending || projectTypeEmpty}
918+
/>
919+
</InputSection>
920+
)}
921+
914922
{tileServerBVisible && (
915923
<InputSection
916924
heading="Tile Server B"

0 commit comments

Comments
 (0)