replace instead of push on publishform
This commit is contained in:
parent
713109167c
commit
777566f414
1 changed files with 2 additions and 2 deletions
|
@ -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'
|
||||||
|
|
Loading…
Reference in a new issue