复刻自,如果是组织要跳转到组织界面

This commit is contained in:
caishi 2021-06-17 16:28:27 +08:00
parent b5835145f7
commit e72e817bb1
1 changed files with 2 additions and 1 deletions

View File

@ -391,10 +391,11 @@ class Detail extends Component {
} }
textFunc = (forked_from_project_id,fork_info)=>{ textFunc = (forked_from_project_id,fork_info)=>{
let type = fork_info && fork_info.fork_project_user_type;
return forked_from_project_id && fork_info ? return forked_from_project_id && fork_info ?
<div className="color-grey-9"> <div className="color-grey-9">
<span>复刻自 </span> <span>复刻自 </span>
<Link to={`/users/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link> <Link to={`${type ==="Organization" ? "/organize":'/users'}/${fork_info.fork_project_user_login}`} className="show-user-link color-grey-6">{fork_info.fork_project_user_name}</Link>
<span> / </span> <span> / </span>
<Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link> <Link to={`/projects/${fork_info.fork_project_user_login}/${fork_info.fork_project_identifier}`} className="color-grey-6">{fork_info.fork_form_name}</Link>
</div> : "" </div> : ""