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,
|
||||
} = 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'
|
||||
|
|
Loading…
Reference in a new issue