From 7cdf66f911737065c4e20fccf034e5d99d33b740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Sat, 16 Mar 2024 14:14:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=85=E7=AE=A1=E7=90=86=E5=91=98=E6=9C=89?= =?UTF-8?q?=E6=9D=83=E9=99=90=E8=BF=9B=E8=A1=8C=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/About/Index.jsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/forge/About/Index.jsx b/src/forge/About/Index.jsx index 7f1222de1..7d544f78d 100644 --- a/src/forge/About/Index.jsx +++ b/src/forge/About/Index.jsx @@ -14,9 +14,10 @@ function Index(props){ const [ content , setContent ] = useState(undefined); const [ edit , setEdit ] = useState(false); const [ fileList , setFileList ] = useState(undefined); - const [ editOpration , setEditOpration ] = useState(false); + // const [ editOpration , setEditOpration ] = useState(false); const { owner , projectsId } = props.match.params; const { isManager , isDeveloper , current_user, projectDetail } = props; + const editOpration = current_user && current_user.login && isManager useEffect(()=>{ if(owner && projectsId && projectDetail){ @@ -25,11 +26,11 @@ function Index(props){ } },[owner,projectsId, projectDetail]) - useEffect(()=>{ - if( (current_user && current_user.login) && (isManager === true || isDeveloper === true)){ - setEditOpration(true); - } - },[isManager , isDeveloper]) + // useEffect(()=>{ + // if( (current_user && current_user.login) && (isManager === true || isDeveloper === true)){ + // setEditOpration(true); + // } + // },[isManager , isDeveloper]) function Init(){ const url = `/${owner}/${projectsId}/about.json`; axios.get(url).then(result=>{