From 777566f414b9f0dd5388005b2428bc3593dc44dc Mon Sep 17 00:00:00 2001 From: zeppi Date: Fri, 26 Mar 2021 17:11:22 -0400 Subject: [PATCH] replace instead of push on publishform --- ui/component/publishForm/view.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/component/publishForm/view.jsx b/ui/component/publishForm/view.jsx index e07711e1d..1bd0041a6 100644 --- a/ui/component/publishForm/view.jsx +++ b/ui/component/publishForm/view.jsx @@ -113,7 +113,7 @@ function PublishForm(props: Props) { user, } = props; - const { push, location } = useHistory(); + const { replace, location } = useHistory(); const urlParams = new URLSearchParams(location.search); const uploadType = urlParams.get('type'); // $FlowFixMe @@ -302,7 +302,7 @@ function PublishForm(props: Props) { if (!uploadType) return; const newParams = new URLSearchParams(); newParams.set('type', mode.toLowerCase()); - push({ search: newParams.toString() }); + replace({ search: newParams.toString() }); }, [mode, uploadType]); // @if TARGET='web'