Skip to content

Commit a3ecb47

Browse files
committed
render "Learn more" if not enabled, too.
1 parent aa51d6c commit a3ecb47

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

components/dashboard/src/projects/ProjectSettings.tsx

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import { Project, ProjectSettings } from "@gitpod/gitpod-protocol";
8-
import { useCallback, useContext, useState } from "react";
8+
import { useCallback, useContext, useState, Fragment } from "react";
99
import { useHistory } from "react-router";
1010
import { CheckboxInputField } from "../components/forms/CheckboxInputField";
1111
import { PageWithSubMenu } from "../components/PageWithSubMenu";
@@ -145,21 +145,23 @@ export default function ProjectSettingsView() {
145145
<CheckboxInputField
146146
label="Enable prebuilds"
147147
hint={
148-
enablePrebuilds ? (
149-
<span>
150-
Prebuilds will run for any <code>before</code> or <code>init</code> tasks.{" "}
151-
<a
152-
className="gp-link"
153-
target="_blank"
154-
rel="noreferrer"
155-
href="https://www.gitpod.io/docs/configure/projects/prebuilds"
156-
>
157-
Learn more
158-
</a>
159-
</span>
160-
) : (
161-
"Requires permissions to configure repository webhooks."
162-
)
148+
<span>
149+
{enablePrebuilds ? (
150+
<Fragment>
151+
Prebuilds will run for any <code>before</code> or <code>init</code> tasks.
152+
</Fragment>
153+
) : (
154+
"Requires permissions to configure repository webhooks."
155+
)}{" "}
156+
<a
157+
className="gp-link"
158+
target="_blank"
159+
rel="noreferrer"
160+
href="https://www.gitpod.io/docs/configure/projects/prebuilds"
161+
>
162+
Learn more
163+
</a>
164+
</span>
163165
}
164166
checked={enablePrebuilds}
165167
onChange={(checked) => updateProjectSettings({ enablePrebuilds: checked })}

0 commit comments

Comments
 (0)