Skip to content

Commit

Permalink
Fix nav moving to edit mode from review tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Bottle7 committed Jul 12, 2023
1 parent a849777 commit 364d81e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/frontend/src/pages/PIAForm/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,9 @@ const PIAFormPage = () => {
? PiaStatuses.EDIT_IN_PROGRESS
: pia?.status,
});
if (pia?.id) {
navigate(getEditPath(pathname));
if (pia?.id && !pathname?.split('/').includes('review')) {
const regex = /(?<=\/)view/g;
navigate(pathname.replace(regex, 'edit'));
} else {
navigate(-1);
}
Expand Down

0 comments on commit 364d81e

Please sign in to comment.