Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64
Your IP : 18.188.114.150
{"version":3,"sources":["containers/DefaultLayout/DefaultFooter.js"],"names":["toast","configure","DefaultFooter","_Component","_getPrototypeOf2","_this","_classCallCheck","this","_len","arguments","length","args","Array","_key","_possibleConstructorReturn","_getPrototypeOf","call","apply","concat","online","dismiss","success","position","POSITION","BOTTOM_RIGHT","autoClose","offline","error","_inherits","_createClass","key","value","window","addEventListener","removeEventListener","_this$props$error","props","error_code","data","status","ertype","React","createElement","Fragment","ToastContainer","Message","style","width","margin","display","padding","className","Header","msg","Button","size","basic","onClick","unsetError","color","content","Component","defaultProps","connect","state"],"mappings":"mOAcAA,IAAMC,YAAY,IAEZC,EAAa,SAAAC,GAAA,SAAAD,IAAA,IAAAE,EAAAC,EAAAC,YAAAC,KAAAL,GAAA,QAAAM,EAAAC,UAAAC,OAAAC,EAAA,IAAAC,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAoBb,OApBaR,EAAAS,YAAAP,MAAAH,EAAAW,YAAAb,IAAAc,KAAAC,MAAAb,EAAA,CAAAG,MAAAW,OAAAP,MASjBQ,OAAS,WACPnB,IAAMoB,UACNpB,IAAMqB,QAAQ,oBAAqB,CACjCC,SAAUtB,IAAMuB,SAASC,aACzBC,UAAW,OAEdpB,EACDqB,QAAU,kBACR1B,IAAM2B,MAAM,yBAA0B,CACpCL,SAAUtB,IAAMuB,SAASC,aACzBC,WAAW,KACXpB,EAoCH,OAxDgBuB,YAAA1B,EAAAC,GAoBb0B,YAAA3B,EAAA,EAAA4B,IAAA,oBAAAC,MAAA,WAlBFC,OAAOC,iBAAiB,SAAU1B,KAAKY,QACvCa,OAAOC,iBAAiB,UAAW1B,KAAKmB,WACzC,CAAAI,IAAA,uBAAAC,MAAA,WAECC,OAAOE,oBAAoB,SAAU3B,KAAKY,QAC1Ca,OAAOE,oBAAoB,UAAW3B,KAAKmB,WAC5C,CAAAI,IAAA,SAAAC,MAAA,WAaQ,IAAAI,EAC8B5B,KAAK6B,MAAMT,MAAxCU,EAAUF,EAAVE,WAAYC,EAAIH,EAAJG,KAAMC,EAAMJ,EAANI,OACpBC,GAAyB,IAAhBH,EAAoB,QAAU,WAE7C,OACEI,IAAAC,cAACD,IAAME,SAAQ,KACbF,IAAAC,cAACE,IAAc,MACC,IAAfP,EACCI,IAAAC,cAAA,WACED,IAAAC,cAACG,IAAO,CACNC,MAAO,CACLC,MAAO,OACPC,OAAQ,QACRC,QAAS,OACTC,QAAS,eAEXC,UAAWX,GAEXC,IAAAC,cAACG,IAAQO,OAAM,KAAC,YACJb,EAAO,cAAYD,EAAKe,IAAK,KAEzCZ,IAAAC,cAAA,OAAKS,UAAU,WACbV,IAAAC,cAACY,IAAM,CACLC,KAAK,OACLC,OAAK,EACLC,QAASlD,KAAK6B,MAAMsB,WACpBC,MAAM,OACNC,QAAQ,SAGH,KAEX,UAGT1D,EAxDgB,CAAS2D,aA4D5B3D,EAAc4D,aA/DO,GAuENC,sBANS,SAAAC,GACtB,MAAO,CACLrC,MAAOqC,EAAMrC,QAMf,CAAE+B,gBAFWK,CAGb7D","file":"static/js/285.baad6799.chunk.js","sourcesContent":["import React, { Component } from \"react\";\r\nimport PropTypes from \"prop-types\";\r\nimport { Message, Button } from \"semantic-ui-react\";\r\nimport { Offline, Online, Detector } from \"react-detect-offline\";\r\nimport { ToastContainer, toast } from \"react-toastify\";\r\nimport { connect } from \"react-redux\";\r\nimport { unsetError } from \"../../actions\";\r\nimport \"react-toastify/dist/ReactToastify.css\";\r\n\r\nconst propTypes = {\r\n children: PropTypes.node\r\n};\r\n\r\nconst defaultProps = {};\r\ntoast.configure();\r\n\r\nclass DefaultFooter extends Component {\r\n componentDidMount() {\r\n window.addEventListener(\"online\", this.online);\r\n window.addEventListener(\"offline\", this.offline);\r\n }\r\n componentWillUnmount() {\r\n window.removeEventListener(\"online\", this.online);\r\n window.removeEventListener(\"offline\", this.offline);\r\n }\r\n online = () => {\r\n toast.dismiss();\r\n toast.success(\"Network Connected\", {\r\n position: toast.POSITION.BOTTOM_RIGHT,\r\n autoClose: 3000\r\n });\r\n };\r\n offline = () =>\r\n toast.error(\"Network Disconnected!!\", {\r\n position: toast.POSITION.BOTTOM_RIGHT,\r\n autoClose: false\r\n });\r\n render() {\r\n const { error_code, data, status } = this.props.error;\r\n const ertype = error_code === -1 ? \"error\" : \"positive\";\r\n\r\n return (\r\n <React.Fragment>\r\n <ToastContainer />\r\n {error_code !== 2 ? (\r\n <div>\r\n <Message\r\n style={{\r\n width: \"72vw\",\r\n margin: \"0.3em\",\r\n display: \"flex\",\r\n padding: \"0.5em 1.5em\"\r\n }}\r\n className={ertype}\r\n >\r\n <Message.Header>\r\n Status : {status}, Message: {data.msg}{\" \"}\r\n </Message.Header>\r\n <div className=\"ml-auto\">\r\n <Button\r\n size=\"mini\"\r\n basic\r\n onClick={this.props.unsetError}\r\n color=\"blue\"\r\n content=\"OK\"\r\n />\r\n </div>\r\n </Message>{\" \"}\r\n </div>\r\n ) : null}\r\n </React.Fragment>\r\n );\r\n }\r\n}\r\n\r\nDefaultFooter.propTypes = propTypes;\r\nDefaultFooter.defaultProps = defaultProps;\r\n\r\nconst mapStateToProps = state => {\r\n return {\r\n error: state.error\r\n };\r\n};\r\n\r\nexport default connect(\r\n mapStateToProps,\r\n { unsetError }\r\n)(DefaultFooter);\r\n"],"sourceRoot":""}
|