mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 14:26:38 +00:00
Update VercelConfigurePage.tsx
This commit is contained in:
+2
-6
@@ -142,9 +142,6 @@ export const VercelConfigurePage = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectedVercelEnvironments = useMemo(() => {
|
const selectedVercelEnvironments = useMemo(() => {
|
||||||
// Structure looks like:
|
|
||||||
// {appId: string, environments: [{id: string, name: string}]}[]
|
|
||||||
|
|
||||||
let selectedEnvironments = vercelEnvironments;
|
let selectedEnvironments = vercelEnvironments;
|
||||||
|
|
||||||
const environments = customEnvironments?.find(
|
const environments = customEnvironments?.find(
|
||||||
@@ -240,12 +237,11 @@ export const VercelConfigurePage = () => {
|
|||||||
<Select
|
<Select
|
||||||
value={targetAppId}
|
value={targetAppId}
|
||||||
onValueChange={(val) => {
|
onValueChange={(val) => {
|
||||||
setTargetAppId(val);
|
|
||||||
|
|
||||||
// Reset the target environment if it's not a default environment
|
|
||||||
if (vercelEnvironments.every((env) => env.slug !== targetEnvironment)) {
|
if (vercelEnvironments.every((env) => env.slug !== targetEnvironment)) {
|
||||||
setTargetEnvironment(vercelEnvironments[0].slug);
|
setTargetEnvironment(vercelEnvironments[0].slug);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setTargetAppId(val);
|
||||||
}}
|
}}
|
||||||
className="w-full border border-mineshaft-500"
|
className="w-full border border-mineshaft-500"
|
||||||
isDisabled={integrationAuthApps.length === 0}
|
isDisabled={integrationAuthApps.length === 0}
|
||||||
|
|||||||
Reference in New Issue
Block a user