This commit is contained in:
parent
55f3bc6201
commit
44d529e867
|
@ -157,7 +157,7 @@ class CoderRootCommit extends Component{
|
|||
<div className="commitList-item f-wrap-between">
|
||||
<div>
|
||||
<AlignTop>
|
||||
<div className="commitDesc"><Link to={{pathname:`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}/${branch}`, query:{commitpage:page}}} className="font-14 color-grey-3 font-bd">{item.message}</Link></div>
|
||||
<div className="commitDesc"><Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}/${branch}?page=${page}`} className="font-14 color-grey-3 font-bd">{item.message}</Link></div>
|
||||
</AlignTop>
|
||||
<p className="f-wrap-alignCenter mt15">
|
||||
<User
|
||||
|
@ -174,7 +174,7 @@ class CoderRootCommit extends Component{
|
|||
<div>
|
||||
<span className="treecopy-cont shadow">
|
||||
<img src={Tree} alt="sha" width={"16px"}/>
|
||||
<Link to={{pathname:`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}/${branch}`, query:{commitpage:page}}}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<Link to={`/${owner}/${projectsId}/commits/${truncateCommitId(`${item.sha}`)}/${branch}?page=${page}`}>{truncateCommitId(`${item.sha}`)}</Link>
|
||||
<input type="text" id={`value${k}`} value={`${truncateCommitId(`${item.sha}`)}`} disabled/>
|
||||
</span>
|
||||
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${k}`}/>
|
||||
|
|
|
@ -43,14 +43,17 @@ const Infos = styled.div`
|
|||
}
|
||||
`;
|
||||
//提交详情页
|
||||
export default ( match , history, location) => {
|
||||
export default ( location) => {
|
||||
console.log(match);
|
||||
const {match , history } = props;
|
||||
const [data, setData] = useState({undefined});
|
||||
const [commit, setCommit] = useState(undefined);
|
||||
const [parents, setParents] = useState(undefined);
|
||||
const [committer, setCommitter] = useState(undefined);
|
||||
const [isSpin, setIsSpin] = useState(true);
|
||||
console.log('----------', location && location.query && location.query.commitpage);
|
||||
const { sha , projectsId, owner, branchName } = match.params;
|
||||
const { sha , projectsId, owner, branchName } = match && match.params;
|
||||
console.log(sha);
|
||||
useEffect(() => {
|
||||
if (projectsId && owner && sha) {
|
||||
const url = `/${owner}/${projectsId}/commits/${sha}.json`;
|
||||
|
|
Loading…
Reference in New Issue