Skip to content

Commit

Permalink
Change cancel on resource create pages to navigate back, rather than …
Browse files Browse the repository at this point in the history
…go back to the all policies page.

Signed-off-by: Jason Madigan <[email protected]>
  • Loading branch information
jasonmadigan committed Oct 14, 2024
1 parent 3b6fe95 commit f9ae3d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/KuadrantDNSPolicyCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ const KuadrantDNSPolicyCreatePage: React.FC = () => {
};

const handleCancel = () => {
history.push('/kuadrant/all-namespaces/policies');
history.goBack();
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/components/KuadrantRateLimitPolicyCreatePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const KuadrantRateLimitPolicyCreatePage: React.FC = () => {
};

const handleCancel = () => {
history.push('/kuadrant/all-namespaces/policies');
history.goBack();
};

return (
Expand Down
6 changes: 3 additions & 3 deletions src/utils/cancel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { History } from 'history';

export function handleCancel (namespace: string ,data , history: History) {
history.push(`/kuadrant/all-namespaces/policies`)
};
export function handleCancel(namespace: string, data, history: History) {
history.goBack();
}

0 comments on commit f9ae3d9

Please sign in to comment.