go(-1)事件在移动端浏览器无效

This commit is contained in:
谢思 2023-06-01 22:09:41 +08:00
parent 76d943ca02
commit 91f2138caa
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ function Project(propsF) {
const {location, match:{params:{id}}, repoPublic, history} = propsF;
const {pathname} = location;
if(id==="2023" && !repoPublic){
history.go(-1);
history.push('/glcc')
}
useEffect(()=>{
window.scrollTo(0, 0);