This commit is contained in:
谢思 2021-09-27 12:00:03 +08:00
parent 295d0dbe5c
commit 55f3bc6201
2 changed files with 4 additions and 5 deletions

View File

@ -157,7 +157,7 @@ class CoderRootCommit extends Component{
<div className="commitList-item f-wrap-between">
<div>
<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>
<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={`/${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/>
</span>
<CopyTool beforeText="复制commit id" afterText="复制成功" inputId={`value${k}`}/>

View File

@ -43,14 +43,13 @@ const Infos = styled.div`
}
`;
//
export default (props) => {
const { match , history } = props;
export default ( match , history, location) => {
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('----------', match , history, props);
console.log('----------', location && location.query && location.query.commitpage);
const { sha , projectsId, owner, branchName } = match.params;
useEffect(() => {
if (projectsId && owner && sha) {