Skip to content

Commit

Permalink
render "Learn more" if not enabled, too.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTugarev committed Sep 14, 2023
1 parent aa51d6c commit a3ecb47
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions components/dashboard/src/projects/ProjectSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -145,21 +145,23 @@ export default function ProjectSettingsView() {
<CheckboxInputField
label="Enable prebuilds"
hint={
enablePrebuilds ? (
<span>
Prebuilds will run for any <code>before</code> or <code>init</code> tasks.{" "}
<a
className="gp-link"
target="_blank"
rel="noreferrer"
href="https://www.gitpod.io/docs/configure/projects/prebuilds"
>
Learn more
</a>
</span>
) : (
"Requires permissions to configure repository webhooks."
)
<span>
{enablePrebuilds ? (
<Fragment>
Prebuilds will run for any <code>before</code> or <code>init</code> tasks.
</Fragment>
) : (
"Requires permissions to configure repository webhooks."
)}{" "}
<a
className="gp-link"
target="_blank"
rel="noreferrer"
href="https://www.gitpod.io/docs/configure/projects/prebuilds"
>
Learn more
</a>
</span>
}
checked={enablePrebuilds}
onChange={(checked) => updateProjectSettings({ enablePrebuilds: checked })}
Expand Down

0 comments on commit a3ecb47

Please sign in to comment.