Skip to content

Commit 79a39c2

Browse files
committed
chore: only show active/standby for project with standby
1 parent 66eb33b commit 79a39c2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/components/pages/routes/_components/RoutesDataTableColumns.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,12 @@ export const RoutesDataTableColumns = (projectName: string, environments: Projec
7272
const { environment } = row.original;
7373
if (environment?.kubernetesNamespaceName) {
7474
let badge
75-
if (environment?.name === producitonEnvironment) {
76-
badge = <Badge className="">Active production</Badge>
77-
} else if (environment?.name === standbyEnvironment) {
78-
badge = <Badge className="">Standby production</Badge>
75+
if (standbyEnvironment) {
76+
if (environment?.name === producitonEnvironment) {
77+
badge = <Badge className="">Active production</Badge>
78+
} else if (environment?.name === standbyEnvironment) {
79+
badge = <Badge className="">Standby production</Badge>
80+
}
7981
}
8082
return <div className="ml-2">
8183
<div><Link href={`/projects/${projectName}/${environment?.kubernetesNamespaceName}`}>{environment?.name}</Link></div>

0 commit comments

Comments
 (0)