diff --git a/src/Components/Account/AccountPage.js b/src/Components/Account/AccountPage.js index b461669..ee5cca5 100644 --- a/src/Components/Account/AccountPage.js +++ b/src/Components/Account/AccountPage.js @@ -13,9 +13,7 @@ const AccountPage = () => { const { currentUserCreatedAt } = useContext(AuthContext); const { appState } = useContext(AppContext); const { group } = appState; - console.log("group", group); const [docsGenerated, setDocsGenerated] = useState(null); - const [docsAllowed, setDocsAllowed] = useState(group?.docsAllowed); const appUserId = group ? group.appUserId : null; const [showModal, setShowModal] = useState(false); @@ -24,6 +22,8 @@ const AccountPage = () => { ? process.env.REACT_APP_API_DEV : process.env.REACT_APP_API_PROD; + const docsAllowed = group?.docsAllowed; + const handleConfirmUpgrade = () => { const isUpgrade = true; const currentPlan = group?.subscriptionPlan; @@ -46,10 +46,6 @@ const AccountPage = () => { return `(${num.slice(0, 3)}) ${num.slice(4, 7)}-${num.slice(6, 10)}`; }; - if (!group) { - return null; - } - const handleCancelSub = async () => { setShowModal(true); try { @@ -72,6 +68,9 @@ const AccountPage = () => { const supReq = "5ac45d12"; navigate(`/requestpage/${supReq}`); }; + if (!group) { + return null; + } return (