diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 2efec394..be03e03f 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -120,12 +120,13 @@ function CoderDepot(props){ setTreeValue(url); getFileInfo(url,branchName); setType("file"); - getReadmeInfo(url,branchName); + // getReadmeInfo(url,branchName); + // setReadme(undefined); }else{ setTreeValue(undefined); getDirInfo(branchName || defaultBranch); setType("dir"); - getReadmeInfo('', branchName || defaultBranch); + // getReadmeInfo('', branchName || defaultBranch); } } },[projectsId,owner,pathname,defaultBranch]) @@ -170,6 +171,7 @@ function CoderDepot(props){ // setReadme(result.data.readme); setEditReadme(false); setHide(true); + getReadmeInfo('', branchName || defaultBranch); } setTimeout(function(){setIsSpin(false);},500); }).catch(error=>{setIsSpin(false);}) @@ -202,16 +204,17 @@ function CoderDepot(props){ setDirInfo(undefined); setFileInfo(en); setType(en.type); + setReadme(undefined); }else{ setFileInfo(undefined); setDirInfo(en); setType("dir"); + getReadmeInfo(path, branchName || defaultBranch); } let c = result.data.last_commit setLastCommit(c && c.commit); setLastCommitAuthor(c && c.committer); setMainFlag(false); - // setReadme(result.data.readme); setReadOnly(true); setReadOnly(!editReadme); setHide(true);