feat(webapp): deprecate the subscription from webapp.

This commit is contained in:
a.bouhuolia
2023-03-05 13:21:06 +02:00
parent 0c1bf302e5
commit f26ced97fe
15 changed files with 118 additions and 228 deletions

View File

@@ -3,15 +3,13 @@ import React from 'react';
import { Route, Switch } from 'react-router-dom';
import { getDashboardRoutes } from '@/routes/dashboard';
import EnsureSubscriptionsIsActive from '../Guards/EnsureSubscriptionsIsActive';
import EnsureSubscriptionsIsInactive from '../Guards/EnsureSubscriptionsIsInactive';
import DashboardPage from './DashboardPage';
/**
* Dashboard inner route content.
*/
function DashboardContentRouteContent({ route }) {
const content = (
return (
<DashboardPage
name={route.name}
Component={route.component}
@@ -23,21 +21,6 @@ function DashboardContentRouteContent({ route }) {
defaultSearchResource={route.defaultSearchResource}
/>
);
return route.subscriptionActive ? (
<EnsureSubscriptionsIsInactive
subscriptionTypes={route.subscriptionActive}
children={content}
redirectTo={'/billing'}
/>
) : route.subscriptionInactive ? (
<EnsureSubscriptionsIsActive
subscriptionTypes={route.subscriptionInactive}
children={content}
redirectTo={'/'}
/>
) : (
content
);
}
/**