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