发布评论者头像路径错误
This commit is contained in:
parent
3b6cc99d49
commit
1a86a75345
|
@ -1,9 +1,30 @@
|
||||||
import React from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { AlignCenter , FlexAJ } from '../Component/layout';
|
import { AlignCenter , FlexAJ } from '../Component/layout';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
import { Dropdown , Spin } from 'antd';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
|
import Axios from 'axios';
|
||||||
|
|
||||||
function Contributors({contributors,owner,projectsId}){
|
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(
|
return(
|
||||||
<div>
|
<div>
|
||||||
<FlexAJ>
|
<FlexAJ>
|
||||||
|
@ -15,7 +36,9 @@ function Contributors({contributors,owner,projectsId}){
|
||||||
contributors && contributors.total_count > 0 ?
|
contributors && contributors.total_count > 0 ?
|
||||||
contributors.list.map((item,key)=>{
|
contributors.list.map((item,key)=>{
|
||||||
return(
|
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
|
<img
|
||||||
className="radius"
|
className="radius"
|
||||||
src={getImageUrl(
|
src={getImageUrl(
|
||||||
`images/${current_user && current_user.image_url}`
|
`/${current_user && current_user.image_url}`
|
||||||
)}
|
)}
|
||||||
alt=""
|
alt=""
|
||||||
width="30"
|
width="30"
|
||||||
|
|
Loading…
Reference in New Issue