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=>{