Skip to content

Commit

Permalink
fix(console): hide ssh component for non supported templated
Browse files Browse the repository at this point in the history
  • Loading branch information
baktun14 committed Aug 20, 2024
1 parent a19039b commit f1f346a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const NewDeploymentContainer: FC = () => {
const router = useRouter();
const searchParams = useSearchParams();
const dseq = searchParams?.get("dseq");
const { toggleCmp } = useSdlBuilder();
const { toggleCmp, hasComponent } = useSdlBuilder();

useEffect(() => {
if (!templates) return;
Expand All @@ -45,7 +45,7 @@ export const NewDeploymentContainer: FC = () => {
setSelectedTemplate(galleryTemplate as TemplateCreation);
setEditedManifest(galleryTemplate.content as string);

if (galleryTemplate.config?.ssh) {
if (galleryTemplate.config?.ssh || (!galleryTemplate.config?.ssh && hasComponent("ssh"))) {
toggleCmp("ssh");
}
}
Expand Down

0 comments on commit f1f346a

Please sign in to comment.