replace instead of push on publishform

This commit is contained in:
zeppi 2021-03-26 17:11:22 -04:00 committed by jessopb
parent 713109167c
commit 777566f414

View file

@ -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'