diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index e6c619c00..371005f7a 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -82,6 +82,17 @@ function CoderDepot(props){ const { bannerList } = props; + + // const [ badges , setBadges] = useState(undefined); + // //按照后端返回的数据格式创建的临时数据 后续改为axios + // function getBadgeData() { + // axios.get(`/${owner}/${projectsId}/badge.json`) + // .then(result => { + // if(result) { + // setBadges(result) + // } + // }) + // } // test data const badges = {badge:[{ "login": "many_stars", "image_url": "https://www.gitlink.org.cn/system/lets/letter_avatars/2/J/236_194_58/120.png", "description": "test description1"}, {"login": "many_stars", "image_url": "https://www.gitlink.org.cn/system/lets/letter_avatars/2/X/181_166_38/120.png", "description": "test description2"}], total_count: 3} console.log(badges.badge) diff --git a/src/forge/users/Infos.js b/src/forge/users/Infos.js index b1bed641e..39b861d3b 100644 --- a/src/forge/users/Infos.js +++ b/src/forge/users/Infos.js @@ -15,6 +15,17 @@ import Loadable from "react-loadable"; import Loading from "../../Loading"; import Badge from "../Main/sub/Badge"; + +//const [ badges , setBadges] = useState(undefined); +// 按照后端返回的数据格式创建的临时数据 后续改为axios +// function getBadgeData() { +// axios.get(`/${username}/statistics/badge.json`) +// .then(result => { +// if(result) { +// setBadges(result) +// } +// }) +// } //test data const badges = {badge:[{ "login": "many_stars", "image_url": "https://testforgeplus.trustie.net//system/lets/letter_avatars/2/G/178_217_57/120.png", "description": "test description1"}, {"login": "many_stars", "image_url": "https://testforgeplus.trustie.net//images/avatars/User/36480?t=1686645429", "description": "test description2"}], total_count: 3}