(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[10],{BbjO:function(e,t,n){"use strict";n.r(t),n.d(t,"MaintenanceView",(function(){return u}));var a=n("q1tI"),i=n.n(a),c=n("39gQ"),r=n("LCzB"),s=(n("rlNk"),n("/MKj")),o=n("XzT5"),m=n("wd/R"),l=n("Ty5D");class u extends a.Component{constructor(e){super(e),this.state={currentMaintenance:void 0},e.inMaintenance||e.history.push("/")}static getDerivedStateFromProps(e,t){if(t.currentMaintenance!==e.currentMaintenance)return{currentMaintenance:e.currentMaintenance,time:m.duration(e.currentMaintenance.DtaEndTime-Date.now(),"milliseconds")}}componentDidMount(){const{time:e}=this.state;this.time=e,this.setState({timer:setInterval(()=>{this.time=m.duration(this.time-1e3,"milliseconds"),this.setState({time:this.time})},1e3)})}componentDidUpdate(e,t,n){const{history:a,inMaintenance:i}=this.props,{currentMaintenance:c,time:r,timer:s}=this.state;e.currentMaintenance!==c&&this.setState({currentMaintenance:this.props.currentMaintenance}),t.time!==r&&r<=0&&(clearInterval(s),a.push("/")),e.inMaintenance!==i&&(i||(s&&clearInterval(s),a.push("/")))}componentWillMount(){clearInterval(this.state.timer)}render(){const{currentMaintenance:e,time:t}=this.state;let n={title:o.a.t("maintenance.serviceNotAvalible"),text:e?o.a.t("maintenance.appUpdate.date",{days:t.days(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds()}):o.a.t("maintenance.appUpdate.nodate"),type:1};return i.a.createElement("div",{className:"maintenance"},i.a.createElement("h1",null," ",n.title," "),i.a.createElement("div",{className:"content"},i.a.createElement("img",{src:c.a,alt:"maintenance"}),i.a.createElement("p",null,o.a.t("maintenance.appUpdate.text")," "),i.a.createElement("p",null,n.text)))}}u=Object(s.connect)(e=>({currentMaintenance:e.maintenance.currentMaintenance,inMaintenance:e.maintenance.inMaintenance}))(u),u=Object(l.o)(u),t.default=Object(r.a)()(u)},rlNk:function(e,t,n){}}]); //# sourceMappingURL=main~181255d7.963d5c69.chunk.js.map