forked from Gitlink/forgeplus-react
添加分支页面匹配
This commit is contained in:
parent
abc57d4ac4
commit
21be664fce
|
|
@ -35,6 +35,12 @@ export const deepRoutes = [
|
|||
onlyHead: true,
|
||||
// component: Information
|
||||
},
|
||||
{
|
||||
key: "detailBranch",
|
||||
path: "/:owner/:projectsId/tree/:branchName",
|
||||
onlyHead: false,
|
||||
component: Detail,
|
||||
},
|
||||
{
|
||||
key: "detail",
|
||||
path: "/:owner/:projectsId",
|
||||
|
|
|
|||
|
|
@ -972,9 +972,9 @@ Detail.preFetch = ({ store, match, query }) => {
|
|||
const promises = [
|
||||
dispatch(setProjectDetail(match.params)),
|
||||
dispatch(setProject(match.params)),
|
||||
dispatch(setProjectEntries({...match.params, branch: ''})),
|
||||
dispatch(setProjectEntries({...match.params, branch: match.params.branchName ? match.params.branchName : ''})),
|
||||
dispatch(setProjectMenuList(match.params)),
|
||||
dispatch(setProjectReadMe({...match.params, branch: ''}))
|
||||
dispatch(setProjectReadMe({...match.params, branch: match.params.branchName ? match.params.branchName : ''}))
|
||||
];
|
||||
const data = await Promise.all(promises);
|
||||
resolve({
|
||||
|
|
|
|||
Loading…
Reference in New Issue