From a3ecb47223b31f08320b7ad44cbfa769a53fed24 Mon Sep 17 00:00:00 2001 From: Alex Tugarev Date: Thu, 14 Sep 2023 13:43:07 +0000 Subject: [PATCH] render "Learn more" if not enabled, too. --- .../src/projects/ProjectSettings.tsx | 34 ++++++++++--------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/components/dashboard/src/projects/ProjectSettings.tsx b/components/dashboard/src/projects/ProjectSettings.tsx index d4b8ce4f2de8de..20988b98f3bd3a 100644 --- a/components/dashboard/src/projects/ProjectSettings.tsx +++ b/components/dashboard/src/projects/ProjectSettings.tsx @@ -5,7 +5,7 @@ */ import { Project, ProjectSettings } from "@gitpod/gitpod-protocol"; -import { useCallback, useContext, useState } from "react"; +import { useCallback, useContext, useState, Fragment } from "react"; import { useHistory } from "react-router"; import { CheckboxInputField } from "../components/forms/CheckboxInputField"; import { PageWithSubMenu } from "../components/PageWithSubMenu"; @@ -145,21 +145,23 @@ export default function ProjectSettingsView() { - Prebuilds will run for any before or init tasks.{" "} - - Learn more - - - ) : ( - "Requires permissions to configure repository webhooks." - ) + + {enablePrebuilds ? ( + + Prebuilds will run for any before or init tasks. + + ) : ( + "Requires permissions to configure repository webhooks." + )}{" "} + + Learn more + + } checked={enablePrebuilds} onChange={(checked) => updateProjectSettings({ enablePrebuilds: checked })}