forked from Gitlink/forgeplus-react
工作流
This commit is contained in:
parent
5bda100e32
commit
350f9426ea
|
@ -1,4 +1,4 @@
|
||||||
import React from 'react';
|
import React , { useEffect } from 'react';
|
||||||
import { WhiteBack } from '../Component/layout';
|
import { WhiteBack } from '../Component/layout';
|
||||||
import './ops.scss';
|
import './ops.scss';
|
||||||
|
|
||||||
|
@ -15,6 +15,19 @@ const Infos = Loadable({
|
||||||
loading: Loading,
|
loading: Loading,
|
||||||
})
|
})
|
||||||
export default ((props)=>{
|
export default ((props)=>{
|
||||||
|
const { projectsId , owner } = props.match.params;
|
||||||
|
const open_devops = props.projectDetail && props.projectDetail.open_devops;
|
||||||
|
|
||||||
|
// 工作流:两种状态进入的链接不同
|
||||||
|
useEffect(()=>{
|
||||||
|
if(open_devops !== undefined){
|
||||||
|
if(open_devops){
|
||||||
|
props.history.replace(`/projects/${owner}/${projectsId}/devops/list`);
|
||||||
|
}else{
|
||||||
|
props.history.replace(`/projects/${owner}/${projectsId}/devops`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},[open_devops])
|
||||||
return(
|
return(
|
||||||
<WhiteBack className="opsPanel">
|
<WhiteBack className="opsPanel">
|
||||||
<Switch {...props}>
|
<Switch {...props}>
|
||||||
|
|
Loading…
Reference in New Issue