mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 00:26:40 +00:00
fix: disabled repo env until repo selected
This commit is contained in:
@@ -17,6 +17,7 @@ import { yupResolver } from "@hookform/resolvers/yup";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
import queryString from "query-string";
|
import queryString from "query-string";
|
||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
import * as yup from "yup";
|
import * as yup from "yup";
|
||||||
|
|
||||||
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
|
||||||
@@ -124,6 +125,7 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const scope = watch("scope");
|
const scope = watch("scope");
|
||||||
|
const repoId = watch("repoId");
|
||||||
const repoIds = watch("repoIds");
|
const repoIds = watch("repoIds");
|
||||||
const repoName = watch("repoName");
|
const repoName = watch("repoName");
|
||||||
const repoOwner = watch("repoOwner");
|
const repoOwner = watch("repoOwner");
|
||||||
@@ -133,7 +135,7 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
repoName,
|
repoName,
|
||||||
repoOwner
|
repoOwner
|
||||||
);
|
);
|
||||||
|
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -237,7 +239,7 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return integrationAuth && workspace && integrationAuthApps ? (
|
return integrationAuth && workspace && integrationAuthApps ? (
|
||||||
<div className="flex w-full h-full flex-col items-center justify-center py-4">
|
<div className="flex h-full w-full flex-col items-center justify-center py-4">
|
||||||
<Head>
|
<Head>
|
||||||
<title>Set Up GitHub Integration</title>
|
<title>Set Up GitHub Integration</title>
|
||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
@@ -508,7 +510,11 @@ export default function GitHubCreateIntegrationPage() {
|
|||||||
<Select
|
<Select
|
||||||
value={field.value}
|
value={field.value}
|
||||||
onValueChange={onChange}
|
onValueChange={onChange}
|
||||||
className="w-full border border-mineshaft-500"
|
isDisabled={!repoId}
|
||||||
|
className={twMerge(
|
||||||
|
"w-full border border-mineshaft-500",
|
||||||
|
!repoId && "h-10 cursor-not-allowed"
|
||||||
|
)}
|
||||||
>
|
>
|
||||||
{integrationAuthGithubEnvs?.length ? (
|
{integrationAuthGithubEnvs?.length ? (
|
||||||
integrationAuthGithubEnvs.map((githubEnv) => {
|
integrationAuthGithubEnvs.map((githubEnv) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user