Client:Pages:DeleteData: fix page crush
This commit is contained in:
parent
2471ec04fb
commit
c71248484e
@ -49,7 +49,7 @@ const PortalDeletion = (props) => {
|
||||
try {
|
||||
await sendDeletePortalEmail();
|
||||
toastr.success(
|
||||
t("PortalDeletionEmailSended", { ownerEmail: owner.email })
|
||||
t("PortalDeletionEmailSended", { ownerEmail: owner.email }),
|
||||
);
|
||||
} catch (error) {
|
||||
toastr.error(error);
|
||||
@ -62,7 +62,7 @@ const PortalDeletion = (props) => {
|
||||
};
|
||||
|
||||
const notActivatedEmail =
|
||||
owner.activationStatus === EmployeeActivationStatus.NotActivated;
|
||||
owner?.activationStatus === EmployeeActivationStatus.NotActivated;
|
||||
|
||||
return (
|
||||
<MainContainer>
|
||||
@ -108,6 +108,8 @@ export default inject(({ settingsStore, userStore }) => {
|
||||
const { getPortalOwner, owner, currentColorScheme } = settingsStore;
|
||||
const { sendActivationLink } = userStore;
|
||||
|
||||
console.log(owner);
|
||||
|
||||
return {
|
||||
getPortalOwner,
|
||||
owner,
|
||||
@ -115,5 +117,5 @@ export default inject(({ settingsStore, userStore }) => {
|
||||
sendActivationLink,
|
||||
};
|
||||
})(
|
||||
withTranslation(["Settings", "MainBar", "People", "Common"])(PortalDeletion)
|
||||
withTranslation(["Settings", "MainBar", "People", "Common"])(PortalDeletion),
|
||||
);
|
||||
|
@ -749,6 +749,7 @@ class SettingsStore {
|
||||
|
||||
getPortalOwner = async () => {
|
||||
const owner = await api.people.getUserById(this.ownerId);
|
||||
|
||||
this.setPortalOwner(owner);
|
||||
return owner;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user