diff --git a/src/forge/About/Index.jsx b/src/forge/About/Index.jsx index 77936fe04..b0d22f9d5 100644 --- a/src/forge/About/Index.jsx +++ b/src/forge/About/Index.jsx @@ -14,15 +14,21 @@ function Index(props){ const [ content , setContent ] = useState(undefined); const [ edit , setEdit ] = useState(false); const [ fileList , setFileList ] = useState(undefined); - + const [ editOpration , setEditOpration ] = useState(false); const { owner , projectsId } = props.match.params; - console.log(props.match.params); + + const { isManager , isDeveloper } = props; useEffect(()=>{ if(owner&&projectsId){ Init(); } },[owner,projectsId]) + useEffect(()=>{ + if(isManager === true || isDeveloper === true){ + setEditOpration(true); + } + },[isManager , isDeveloper]) function Init(){ const url = `/${owner}/${projectsId}/about.json`; axios.get(url).then(result=>{ @@ -64,7 +70,7 @@ function Index(props){