Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export default async function Routes(props: {
{queryRef => (
<EnvironmentRoutesPage
projectName={projectSlug}
environmentName={environmentSlug}
queryRef={queryRef as QueryRef<EnvironmentRoutesData>}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const meta: Meta<typeof EnvironmentRoutesPage> = {
query={environmentWithRoutes}
variables={{ openshiftProjectName: 'project-main' }}
>
{queryRef => <EnvironmentRoutesPage queryRef={queryRef} projectName="test-project" />}
{queryRef => <EnvironmentRoutesPage queryRef={queryRef} projectName="test-project" environmentName="main" />}
</MockPreloadQuery>
),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import { RoutesDataTableColumns } from './_components/RoutesDataTableColumns';
import React from "react";


export default function EnvironmentRoutesPage({queryRef, projectName,}: {
export default function EnvironmentRoutesPage({queryRef, projectName, environmentName}: {
queryRef: QueryRef<EnvironmentRoutesData>;
projectName: string;
environmentName: string;
}) {
const [{ results, route_query }, setQuery] = useQueryStates({
results: {
Expand Down Expand Up @@ -48,7 +49,7 @@ export default function EnvironmentRoutesPage({queryRef, projectName,}: {
// Show notification for pending changes
usePendingChangesNotification({
environment: environmentRoutes,
environmentSlug: environmentRoutes.name,
environmentSlug: environmentName,
});

return (
Expand Down