diff --git a/src/forge/Main/Detail.js b/src/forge/Main/Detail.js
index 222bfad5..a73ee8f0 100644
--- a/src/forge/Main/Detail.js
+++ b/src/forge/Main/Detail.js
@@ -55,7 +55,8 @@ const OrderupdateMilepost = Loadable({
})
const OrderupdateDetail = Loadable({
- loader: () => import('../Order/UpdateDetail'),
+ // loader: () => import('../Order/UpdateDetail'),
+ loader: () => import('../Order/order_form'),
loading: Loading,
})
@@ -213,6 +214,10 @@ class Detail extends Component {
}
}
+ componentWillUnmount() {
+ this.timerChannel && clearTimeout(this.timerChannel);
+ }
+
getProject = (num) => {
const { projectsId, owner } = this.props.match.params;
const url = `/${owner}/${projectsId}/simple.json`;
@@ -275,7 +280,9 @@ class Detail extends Component {
connected: () => {
console.log("###### channel connected! ######");
},
- disconnected: () => { },
+ disconnected: () => {
+ console.log("###### cannot connected! ######");
+ },
received: data => {
console.log(`###### ---received data--- ######`);
console.log(data);
@@ -296,10 +303,22 @@ class Detail extends Component {
});
cable.subscriptions.consumer.disconnect();
}
+ },
+ onerror:()=>{
+ console.log("###### cannot connected! ######");
}
- })
+ });
+
+ this.timerChannel = setTimeout(this.reloadDetail,5000);
}
+ reloadDetail=()=>{
+ if(this.state.firstSync||this.state.secondSync){
+ window.location.reload();
+ }
+ }
+
+
deleteProjectBack = () => {
const { history } = this.props;
const { projectsId, owner } = this.props.match.params;
@@ -700,16 +719,16 @@ class Detail extends Component {
(props) => (