forked from Gitlink/forgeplus-react
列表的type字段为头像跳转到个人中心或者组织的判断依据
This commit is contained in:
parent
5d6b95ab8f
commit
c8eda704e5
|
@ -27,7 +27,7 @@ class IndexItem extends Component {
|
||||||
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
<img className="p-r-photo" alt="" src={item.author && item.author.image_url} ></img>
|
||||||
</a>
|
</a>
|
||||||
:
|
:
|
||||||
<Link to={`/users/${item.author.login}`} className="show-user-link">
|
<Link to={item.author && (item.author.type === "Organization" ? `/organize/${item.author.login}`:`/users/${item.author.login}`)} className="show-user-link">
|
||||||
<img className="p-r-photo" alt="" src={getImageUrl(`${item.author && item.author.image_url}`)} ></img>
|
<img className="p-r-photo" alt="" src={getImageUrl(`${item.author && item.author.image_url}`)} ></img>
|
||||||
</Link>
|
</Link>
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,19 +97,19 @@ function DetailBanner({ list , owner , projectsId , isManager , url , pathname ,
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
item.menu_name === "setting" &&
|
||||||
|
<li className={pathname === "setting" ? "active" : ""}>
|
||||||
|
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
||||||
|
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
||||||
|
<span>仓库设置</span>
|
||||||
|
</Link>
|
||||||
|
</li>
|
||||||
|
}
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
{
|
|
||||||
isManager && platform ?
|
|
||||||
<li className={pathname === "setting" ? "active" : ""}>
|
|
||||||
<Link to={`/projects/${owner}/${projectsId}/setting`}>
|
|
||||||
<i className={url && url.indexOf("/setting") > 0 ? "iconfont icon-cangku color-grey-3 mr5 font-14":"iconfont icon-cangku color-grey-6 font-14 mr5"}></i>
|
|
||||||
<span>仓库设置</span>
|
|
||||||
</Link>
|
|
||||||
</li>:""
|
|
||||||
}
|
|
||||||
</ul>
|
</ul>
|
||||||
:
|
:
|
||||||
<Skeleton paragraph={false} active={true}/>
|
<Skeleton paragraph={false} active={true}/>
|
||||||
|
|
Loading…
Reference in New Issue