forked from Gitlink/forgeplus-react
发布评论者头像路径错误
This commit is contained in:
parent
af2feeb34f
commit
e6020c3e13
|
@ -1,9 +1,30 @@
|
|||
import React from 'react';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { AlignCenter , FlexAJ } from '../Component/layout';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Dropdown , Spin } from 'antd';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Axios from 'axios';
|
||||
|
||||
function Contributors({contributors,owner,projectsId}){
|
||||
|
||||
// function menuFunc(login){
|
||||
// let data = undefined;
|
||||
// const url = `/users/${login}.json`;
|
||||
// Axios.get(url).then(result=>{
|
||||
// if(result && result.data){
|
||||
// data = result.data;
|
||||
// }
|
||||
// }).catch(error=>{})
|
||||
|
||||
// if(data){
|
||||
// return(
|
||||
// <div>111</div>
|
||||
// )
|
||||
// }else{
|
||||
// return <Spin />
|
||||
// }
|
||||
// }
|
||||
|
||||
return(
|
||||
<div>
|
||||
<FlexAJ>
|
||||
|
@ -15,7 +36,9 @@ function Contributors({contributors,owner,projectsId}){
|
|||
contributors && contributors.total_count > 0 ?
|
||||
contributors.list.map((item,key)=>{
|
||||
return(
|
||||
<Link key={key} to={`/users/${item.login}`}><img src={getImageUrl(`/${item.image_url}`)} alt=""/></Link>
|
||||
// <Dropdown overlay={()=>menuFunc(item.login)}>
|
||||
<Link key={key} to={`/users/${item.login}`}><img src={getImageUrl(`/${item.image_url}`)} alt=""/></Link>
|
||||
// </Dropdown>
|
||||
)
|
||||
})
|
||||
:""
|
||||
|
|
|
@ -310,7 +310,7 @@ class comments extends Component {
|
|||
<img
|
||||
className="radius"
|
||||
src={getImageUrl(
|
||||
`images/${current_user && current_user.image_url}`
|
||||
`/${current_user && current_user.image_url}`
|
||||
)}
|
||||
alt=""
|
||||
width="30"
|
||||
|
|
Loading…
Reference in New Issue