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, user,
} = props; } = props;
const { push, location } = useHistory(); const { replace, location } = useHistory();
const urlParams = new URLSearchParams(location.search); const urlParams = new URLSearchParams(location.search);
const uploadType = urlParams.get('type'); const uploadType = urlParams.get('type');
// $FlowFixMe // $FlowFixMe
@ -302,7 +302,7 @@ function PublishForm(props: Props) {
if (!uploadType) return; if (!uploadType) return;
const newParams = new URLSearchParams(); const newParams = new URLSearchParams();
newParams.set('type', mode.toLowerCase()); newParams.set('type', mode.toLowerCase());
push({ search: newParams.toString() }); replace({ search: newParams.toString() });
}, [mode, uploadType]); }, [mode, uploadType]);
// @if TARGET='web' // @if TARGET='web'