Skip to content

Commit

Permalink
fix: fix team city integrations create page
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-ray-wilson committed Jan 22, 2025
1 parent 6cdc71b commit 586dbd7
Showing 1 changed file with 16 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,10 @@ export const TeamcityConfigurePage = () => {
}
};

const filteredBuildConfigs = targetBuildConfigs?.concat({
name: "",
buildConfigId: ""
});

return integrationAuth &&
selectedSourceEnvironment &&
integrationAuthApps &&
filteredBuildConfigs &&
targetBuildConfigs &&
targetAppId ? (
<div className="flex h-full w-full items-center justify-center">
<Helmet>
Expand Down Expand Up @@ -185,7 +180,7 @@ export const TeamcityConfigurePage = () => {
))
) : (
<SelectItem value="none" key="target-app-none">
No project found
No projects found
</SelectItem>
)}
</Select>
Expand All @@ -195,15 +190,22 @@ export const TeamcityConfigurePage = () => {
value={targetBuildConfigId}
onValueChange={(val) => setTargetBuildConfigId(val)}
className="w-full border border-mineshaft-500"
isDisabled={targetBuildConfigs.length === 0}
>
{filteredBuildConfigs.map((buildConfig: any) => (
<SelectItem
value={buildConfig.buildConfigId}
key={`target-build-config-${buildConfig.buildConfigId}`}
>
{buildConfig.name}
{targetBuildConfigs.length ? (
targetBuildConfigs.map((buildConfig: any) => (
<SelectItem
value={buildConfig.buildConfigId}
key={`target-build-config-${buildConfig.buildConfigId}`}
>
{buildConfig.name}
</SelectItem>
))
) : (
<SelectItem value="none" key="target-app-none">
No build configs found
</SelectItem>
))}
)}
</Select>
</FormControl>
<Button
Expand Down

0 comments on commit 586dbd7

Please sign in to comment.