more
This commit is contained in:
@@ -13,8 +13,9 @@ const AccountPage = () => {
|
|||||||
const { currentUserCreatedAt } = useContext(AuthContext);
|
const { currentUserCreatedAt } = useContext(AuthContext);
|
||||||
const { appState } = useContext(AppContext);
|
const { appState } = useContext(AppContext);
|
||||||
const { group } = appState;
|
const { group } = appState;
|
||||||
|
console.log("group", group);
|
||||||
const [docsGenerated, setDocsGenerated] = useState(null);
|
const [docsGenerated, setDocsGenerated] = useState(null);
|
||||||
const [docsAllowed, setDocsAllowed] = useState(10);
|
const [docsAllowed, setDocsAllowed] = useState(group?.docsAllowed);
|
||||||
const appUserId = group ? group.appUserId : null;
|
const appUserId = group ? group.appUserId : null;
|
||||||
const [showModal, setShowModal] = useState(false);
|
const [showModal, setShowModal] = useState(false);
|
||||||
|
|
||||||
@@ -47,19 +48,20 @@ const AccountPage = () => {
|
|||||||
setShowModal(true);
|
setShowModal(true);
|
||||||
try {
|
try {
|
||||||
let response = await fetch(`${apiUrl}/cancel-subscription`, {
|
let response = await fetch(`${apiUrl}/cancel-subscription`, {
|
||||||
method: 'POST',
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json',
|
"Content-Type": "application/json",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
appUserId: appUserId,
|
appUserId: appUserId,
|
||||||
}),
|
}),
|
||||||
})
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
setShowModal(false);
|
setShowModal(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSupport = () => {
|
const handleSupport = () => {
|
||||||
const supReq = "5ac45d12";
|
const supReq = "5ac45d12";
|
||||||
navigate(`/requestpage/${supReq}`);
|
navigate(`/requestpage/${supReq}`);
|
||||||
@@ -98,7 +100,7 @@ const AccountPage = () => {
|
|||||||
</div>
|
</div>
|
||||||
<div className="account-card-actions">
|
<div className="account-card-actions">
|
||||||
<Button
|
<Button
|
||||||
className="primary-button"
|
className="primary-button upgrade-account"
|
||||||
labelText="Upgrade to add more"
|
labelText="Upgrade to add more"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ $button-padding: 0 5px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upgrade-account {
|
||||||
|
width: 190px;
|
||||||
|
}
|
||||||
|
|
||||||
.secondary-button {
|
.secondary-button {
|
||||||
height: $button-height;
|
height: $button-height;
|
||||||
padding: $button-padding;
|
padding: $button-padding;
|
||||||
|
|||||||
Reference in New Issue
Block a user