Web: Hiding the portal's removal page for standalone.

This commit is contained in:
Tatiana Lopaeva 2023-05-22 12:31:30 +03:00
parent 867136f6f0
commit 4930238bce
2 changed files with 6 additions and 2 deletions

View File

@ -289,7 +289,7 @@ class ArticleBodyContent extends React.Component {
});
}
if (!isOwner) {
if (!isOwner || standalone) {
const index = resultTree.findIndex((n) => n.tKey === "PortalDeletion");
if (index !== -1) {
resultTree.splice(index, 1);

View File

@ -31,6 +31,7 @@ const PrivateRoute = ({ component: Component, ...rest }) => {
withManager,
withCollaborator,
isLogout,
standalone,
} = rest;
const { params, path } = computedMatch;
@ -81,7 +82,8 @@ const PrivateRoute = ({ component: Component, ...rest }) => {
if (
isLoaded &&
((!isNotPaidPeriod && isPortalUnavailableUrl) ||
(!user.isOwner && isPortalDeletionUrl))
(!user.isOwner && isPortalDeletionUrl) ||
(standalone && isPortalDeletionUrl))
) {
return window.location.replace("/");
}
@ -251,6 +253,7 @@ export default inject(({ auth }) => {
wizardCompleted,
personal,
tenantStatus,
standalone,
} = settingsStore;
return {
@ -264,5 +267,6 @@ export default inject(({ auth }) => {
tenantStatus,
personal,
isLogout,
standalone,
};
})(observer(PrivateRoute));