Skip to content

Commit 0fdf8ba

Browse files
authored
Merge pull request #127 from uselagoon/pending-deploy-issue
Fix: Adds correct environmentSlug
2 parents 0711d56 + 27ea389 commit 0fdf8ba

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/app/(routegroups)/(projectroutes)/projects/[projectSlug]/[environmentSlug]/routes/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export default async function Routes(props: {
6666
{queryRef => (
6767
<EnvironmentRoutesPage
6868
projectName={projectSlug}
69+
environmentName={environmentSlug}
6970
queryRef={queryRef as QueryRef<EnvironmentRoutesData>}
7071
/>
7172
)}

src/components/pages/environmentRoutes/EnvironmentRoutesPage.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const meta: Meta<typeof EnvironmentRoutesPage> = {
8282
query={environmentWithRoutes}
8383
variables={{ openshiftProjectName: 'project-main' }}
8484
>
85-
{queryRef => <EnvironmentRoutesPage queryRef={queryRef} projectName="test-project" />}
85+
{queryRef => <EnvironmentRoutesPage queryRef={queryRef} projectName="test-project" environmentName="main" />}
8686
</MockPreloadQuery>
8787
),
8888
};

src/components/pages/environmentRoutes/EnvironmentRoutesPage.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ import { RoutesDataTableColumns } from './_components/RoutesDataTableColumns';
1212
import React from "react";
1313

1414

15-
export default function EnvironmentRoutesPage({queryRef, projectName,}: {
15+
export default function EnvironmentRoutesPage({queryRef, projectName, environmentName}: {
1616
queryRef: QueryRef<EnvironmentRoutesData>;
1717
projectName: string;
18+
environmentName: string;
1819
}) {
1920
const [{ results, route_query }, setQuery] = useQueryStates({
2021
results: {
@@ -48,7 +49,7 @@ export default function EnvironmentRoutesPage({queryRef, projectName,}: {
4849
// Show notification for pending changes
4950
usePendingChangesNotification({
5051
environment: environmentRoutes,
51-
environmentSlug: environmentRoutes.name,
52+
environmentSlug: environmentName,
5253
});
5354

5455
return (

0 commit comments

Comments
 (0)