Skip to content

Commit

Permalink
frontend: Fixing issue with missing params for Wizard onBack (#2967)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdslaugh authored Mar 27, 2024
1 parent 56541a4 commit b554780
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/packages/wizard/src/wizard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ const Wizard = ({
displayWarnings: (warnings: string[]) => {
setGlobalWarnings(warnings);
},
onBack: ({ toOrigin, keepSearch = false }: { toOrigin: boolean; keepSearch?: boolean }) => {
onBack: (params: { toOrigin?: boolean; keepSearch?: boolean }) => {
setGlobalWarnings([]);
if (!keepSearch) {
if (!params?.keepSearch) {
setSearchParams({});
}
if (toOrigin && origin) {
if (params?.toOrigin && origin) {
navigate(origin);
} else {
dispatch(WizardAction.BACK);
Expand Down

0 comments on commit b554780

Please sign in to comment.