- {item.message}
+ {item.message}
- {truncateCommitId(`${item.sha}`)}
+ {truncateCommitId(`${item.sha}`)}
diff --git a/src/forge/Main/Diff.jsx b/src/forge/Main/Diff.jsx
index 8da71238..98321b27 100644
--- a/src/forge/Main/Diff.jsx
+++ b/src/forge/Main/Diff.jsx
@@ -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`;