Skip to content

Commit

Permalink
fix: check modal manager
Browse files Browse the repository at this point in the history
  • Loading branch information
amina-deriv committed Jul 15, 2024
1 parent e83dd4a commit 86f0856
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,15 @@ const ResetPasswordModal = observer(() => {
const history = useHistory();

const removeActionParam = () => {
const searchParams = new URLSearchParams(location.search);
searchParams.delete('action');
const { pathname, search } = location;
const searchParams = new URLSearchParams(search);

if (searchParams.has('action')) {
searchParams.delete('action');
}
const newSearch = searchParams.toString();
const newPath = `${location.pathname}${newSearch ? `?${newSearch}` : ''}`;
const newPath = `${pathname}${newSearch ? `?${newSearch}` : ''}`;

history.push(newPath);
};

Expand Down

0 comments on commit 86f0856

Please sign in to comment.