{"ast":null,"code":"import'./styles.css';import React,{useEffect,useState}from'react';import{useLocation}from'react-router-dom';import{useHistory}from'react-router-dom';import{connect}from'react-redux';import{checkOrganisation}from'../../reduxStore/actions/action';import{jsx as _jsx,Fragment as _Fragment}from\"react/jsx-runtime\";function Organisation(_ref){let{organisation,checkOrganisation}=_ref;const location=useLocation();const searchParams=new URLSearchParams(location.search);const orgId=searchParams.get('orgId');const history=useHistory();const[loading,setLoading]=useState(true);useEffect(()=>{checkOrganisation({id:orgId},()=>{setLoading(false);history.push('/setu_game/login');},()=>{setLoading(false);});},[orgId]);return/*#__PURE__*/_jsx(_Fragment,{children:/*#__PURE__*/_jsx(\"div\",{className:\"component-wrapper\",children:/*#__PURE__*/_jsx(\"div\",{className:\"notfound-container\",children:/*#__PURE__*/_jsx(\"h1\",{children:loading?\"Loading...\":\"404! Page Not Found\"})})})});}const mapStateToProps=state=>{const{organisation}=state.SeTu;return{organisation};};const mapDispatchToProps=dispatch=>({checkOrganisation:(params,successCallback,callback)=>dispatch(checkOrganisation(params,successCallback,callback))});export default connect(mapStateToProps,mapDispatchToProps)(Organisation);","map":{"version":3,"names":["React","useEffect","useState","useLocation","useHistory","connect","checkOrganisation","jsx","_jsx","Fragment","_Fragment","Organisation","_ref","organisation","location","searchParams","URLSearchParams","search","orgId","get","history","loading","setLoading","id","push","children","className","mapStateToProps","state","SeTu","mapDispatchToProps","dispatch","params","successCallback","callback"],"sources":["/opt/bitnami/apache/htdocs/setu_beta_game/src/pages/organisation/organisation.js"],"sourcesContent":["\r\n\r\nimport './styles.css'\r\nimport React ,{useEffect, useState} from 'react';\r\nimport {useLocation } from 'react-router-dom';\r\nimport { useHistory } from 'react-router-dom';\r\nimport { connect } from 'react-redux';\r\nimport { checkOrganisation } from '../../reduxStore/actions/action';\r\nfunction Organisation({organisation,checkOrganisation}) {\r\n    const location = useLocation();\r\n    const searchParams = new URLSearchParams(location.search);\r\n    const orgId = searchParams.get('orgId');\r\n    const history = useHistory();\r\n    const [loading,setLoading]=useState(true);\r\n    useEffect(() => {\r\n\r\n      checkOrganisation({id:orgId},()=>{\r\n        setLoading(false);\r\n        history.push('/setu_game/login');\r\n      },()=>{\r\n        setLoading(false);\r\n      })\r\n    }, [orgId]);\r\n \r\n    return (\r\n        <>\r\n  \r\n\r\n        <div className='component-wrapper'>\r\n        <div className='notfound-container'>\r\n        <h1>{loading?\"Loading...\":\"404! Page Not Found\"}</h1>\r\n        </div>    \r\n        </div>\r\n\r\n      \r\n        </>\r\n    )\r\n}\r\n\r\n\r\nconst mapStateToProps = state => {\r\n    const {organisation}  = state.SeTu;\r\n  \r\n  return { organisation}\r\n  }\r\n  \r\n  \r\n  const mapDispatchToProps = dispatch =>  ({\r\n    checkOrganisation: (params,successCallback,callback) => dispatch( checkOrganisation(params,successCallback,callback)),\r\n   \r\n  })\r\n  \r\n  export default connect( mapStateToProps,mapDispatchToProps)(Organisation)\r\n"],"mappings":"AAEA,MAAO,cAAc,CACrB,MAAO,CAAAA,KAAK,EAAGC,SAAS,CAAEC,QAAQ,KAAO,OAAO,CAChD,OAAQC,WAAW,KAAQ,kBAAkB,CAC7C,OAASC,UAAU,KAAQ,kBAAkB,CAC7C,OAASC,OAAO,KAAQ,aAAa,CACrC,OAASC,iBAAiB,KAAQ,iCAAiC,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,QAAA,IAAAC,SAAA,yBACpE,QAAS,CAAAC,YAAYA,CAAAC,IAAA,CAAmC,IAAlC,CAACC,YAAY,CAACP,iBAAiB,CAAC,CAAAM,IAAA,CAClD,KAAM,CAAAE,QAAQ,CAAGX,WAAW,CAAC,CAAC,CAC9B,KAAM,CAAAY,YAAY,CAAG,GAAI,CAAAC,eAAe,CAACF,QAAQ,CAACG,MAAM,CAAC,CACzD,KAAM,CAAAC,KAAK,CAAGH,YAAY,CAACI,GAAG,CAAC,OAAO,CAAC,CACvC,KAAM,CAAAC,OAAO,CAAGhB,UAAU,CAAC,CAAC,CAC5B,KAAM,CAACiB,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