UNPKG

nextjs-seo-manager

Version:
2 lines (1 loc) 1.38 kB
import e from"react";import{connect as o}from"react-redux";import{r as t}from"./default-2fe6655e.js";import"axios";const s=e.lazy(()=>import("./login-6f160db2.js")),i=e.lazy(()=>import("./loading-cba9c8be.js")),l=e.lazy(()=>import("./Manager-8ffda549.js"));class n extends e.Component{constructor(e){super(e),this.onClose=()=>{this.props.onClose()},this.setLoading=e=>{this.setState({loading:e})};const o=t();this.state={loading:!1,projectId:o.projectId}}render(){var o,t,n,a,r,d,p,u,g;return e.createElement(e.Fragment,null,e.createElement(e.Suspense,{fallback:e.createElement(e.Fragment,null)},e.createElement(s,{onClose:this.onClose}),(null===(null===(t=null===(o=this.props)||void 0===o?void 0:o.user)||void 0===t?void 0:t.isLoggedIn)||!0===(null===(n=this.state)||void 0===n?void 0:n.loading))&&e.createElement(i,{onClose:this.onClose}),!0===(null===(r=null===(a=this.props)||void 0===a?void 0:a.user)||void 0===r?void 0:r.isLoggedIn)&&!0===(null===(p=null===(d=this.props)||void 0===d?void 0:d.user)||void 0===p?void 0:p.authorizedProject)&&e.createElement(l,{data:null===(u=this.props)||void 0===u?void 0:u.data,isNewPage:null===(g=this.props)||void 0===g?void 0:g.isNewPage,onClose:this.onClose,onIsLoading:this.setLoading,isLoading:this.state.loading,onChangeComplete:this.props.onChangeComplete})))}}var a=o(e=>({user:null==e?void 0:e.user}))(n);export{a as default};