forked from Gitlink/forgeplus-react
Change
This commit is contained in:
parent
e0e6cdcc79
commit
a9161b86a2
|
@ -43,7 +43,7 @@ class Infos extends Component {
|
|||
isSpin: false,
|
||||
user: undefined,
|
||||
project_type: undefined,
|
||||
route_type: undefined
|
||||
route_type: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -113,6 +113,7 @@ class Infos extends Component {
|
|||
|
||||
|
||||
render() {
|
||||
const extra_http = `${document.location.protocol}//${document.domain}`;
|
||||
const { current_user, mygetHelmetapi } = this.props;
|
||||
const { user, isSpin, project_type, route_type } = this.state;
|
||||
return (
|
||||
|
@ -141,8 +142,7 @@ class Infos extends Component {
|
|||
<Button
|
||||
block
|
||||
className="text-button-grey"
|
||||
href={`${window.location.protocol}://${document.domain}/accounts/${user.login}`}
|
||||
target="_blank"
|
||||
href={`${extra_http}/accounts/${user.login}`}
|
||||
>
|
||||
{" "}
|
||||
<i className="iconfont icon-shezhi4 font-15 mr5"></i>
|
||||
|
@ -163,22 +163,22 @@ class Infos extends Component {
|
|||
)}
|
||||
</div>
|
||||
<div className="width100 inline-block mt20">
|
||||
<Link
|
||||
to={`${window.location.protocol}://${document.domain}/users/${user && user.login}/user_watchlist`}
|
||||
<a
|
||||
href={`${extra_http}/users/${user && user.login}/user_watchlist`}
|
||||
className={`with50 text-center pull-left ${route_type === "watchers" ? "text-primary" : ""}`}
|
||||
onClick={() =>this.route_link("watchers")}
|
||||
>
|
||||
<div>{current_user && user && user.login === current_user.login ? "我关注的" : "TA关注的"}</div>
|
||||
<span>{user && user.watching_count}</span>
|
||||
</Link>
|
||||
<Link
|
||||
to={`${window.location.protocol}://${document.domain}/users/${user && user.login}/user_fanslist`}
|
||||
</a>
|
||||
<a
|
||||
href={`${extra_http}/users/${user && user.login}/user_fanslist`}
|
||||
onClick={() =>this.route_link("fan_users")}
|
||||
className={`with50 text-center pull-left ${route_type === "fan_users" ? "text-primary" : ""}`}
|
||||
>
|
||||
<div>{current_user && user && user.login === current_user.login ? "关注我的" : "关注TA的"}</div>
|
||||
<span>{user && user.watched_count}</span>
|
||||
</Link>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue